public class MetaDataView extends ViewPart implements IMetadataPart, ISelectionListener, TextGridObject.ITextGridObjectListener, ITextGridProjectListener, ISaveablePart, IPartListener
Modifier and Type | Class and Description |
---|---|
static class |
MetaDataView.OBJECT_TYPE |
TextGridObject.ITextGridObjectListener.Event
ITextGridProjectListener.Event
Modifier and Type | Field and Description |
---|---|
static String |
ID |
PROP_DIRTY
PROP_TITLE
Constructor and Description |
---|
MetaDataView() |
Modifier and Type | Method and Description |
---|---|
static String |
convertStreamToString(InputStream is) |
void |
createPartControl(Composite parent)
This is a callback that will allow us to create the viewer and initialize
it.
|
void |
dispose() |
void |
doSave(IProgressMonitor monitor) |
void |
doSaveAs() |
TextGridObject |
getTextGridObject()
Returns the at the moment loaded TextGrid object.
|
boolean |
isDirty() |
boolean |
isEditable() |
boolean |
isSaveAsAllowed() |
boolean |
isSaveOnCloseNeeded() |
void |
partActivated(IWorkbenchPart part) |
void |
partBroughtToTop(IWorkbenchPart part) |
void |
partClosed(IWorkbenchPart part) |
void |
partDeactivated(IWorkbenchPart part) |
void |
partOpened(IWorkbenchPart part) |
void |
reloadProjectFile(TextGridProject project) |
void |
selectionChanged(IWorkbenchPart sourcepart,
ISelection selection)
This is a call-back method that will be called when a resource is
selected.
|
void |
setFocus()
Passing the focus request to the viewer's control.
|
void |
setMetadataInView(TextGridObject tgO,
boolean rebuild)
Sets the metadata of the referred
TextGridObject in the view. |
void |
setVisible(boolean visible)
Set the visibility of the content of the Metadata-Editor.
|
void |
textGridObjectChanged(TextGridObject.ITextGridObjectListener.Event event,
TextGridObject object)
This method will be called on changes in the
TextGridObject . |
void |
textGridProjectChanged(ITextGridProjectListener.Event event,
TextGridProject project)
The given event has happend to the given
project.
|
void |
triggerCheckField(String xpathQuery)
Check the content of a field in the metadata editor using xpath-Query to
select this field
|
void |
update()
Updates the metadata editor on changes.
|
boolean |
validate()
Validate the input of the meta data part
|
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
getAdapter
public static final String ID
public void createPartControl(Composite parent)
createPartControl
in interface IWorkbenchPart
createPartControl
in class WorkbenchPart
public void setVisible(boolean visible)
visible
- public static String convertStreamToString(InputStream is) throws Exception
Exception
public void selectionChanged(IWorkbenchPart sourcepart, ISelection selection)
selectionChanged
in interface ISelectionListener
public void setMetadataInView(TextGridObject tgO, boolean rebuild)
TextGridObject
in the view.tgO
- the referred TextGridObjectpublic void setFocus()
setFocus
in interface IWorkbenchPart
setFocus
in class WorkbenchPart
public void update()
update
in interface IMetadataPart
public void dispose()
dispose
in interface IWorkbenchPart
dispose
in class WorkbenchPart
public void textGridProjectChanged(ITextGridProjectListener.Event event, TextGridProject project)
ITextGridProjectListener
textGridProjectChanged
in interface ITextGridProjectListener
public void textGridObjectChanged(TextGridObject.ITextGridObjectListener.Event event, TextGridObject object)
TextGridObject
.textGridObjectChanged
in interface TextGridObject.ITextGridObjectListener
public void doSave(IProgressMonitor monitor)
doSave
in interface ISaveablePart
public void doSaveAs()
doSaveAs
in interface ISaveablePart
public boolean isDirty()
isDirty
in interface ISaveablePart
public boolean isSaveAsAllowed()
isSaveAsAllowed
in interface ISaveablePart
public boolean isSaveOnCloseNeeded()
isSaveOnCloseNeeded
in interface ISaveablePart
public boolean validate()
IMetadataPart
validate
in interface IMetadataPart
public void partActivated(IWorkbenchPart part)
partActivated
in interface IPartListener
public void partBroughtToTop(IWorkbenchPart part)
partBroughtToTop
in interface IPartListener
public void partClosed(IWorkbenchPart part)
partClosed
in interface IPartListener
public void partDeactivated(IWorkbenchPart part)
partDeactivated
in interface IPartListener
public void partOpened(IWorkbenchPart part)
partOpened
in interface IPartListener
public boolean isEditable()
isEditable
in interface IMetadataPart
public TextGridObject getTextGridObject()
public void triggerCheckField(String xpathQuery)
xpathQuery
- the xpathQuery which contains the path of the fieldpublic void reloadProjectFile(TextGridProject project) throws CoreException
CoreException