Class AbstractEditor<T extends AbstractVisualizationSingleDatastreamInput>
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.palladiosimulator.edp2.visualization.editors.AbstractEditor<T>
- All Implemented Interfaces:
IAdaptable
,IExecutableExtension
,IEditorPart
,IPersistable
,IPersistableEditor
,ISaveablePart
,IWorkbenchPart
,IWorkbenchPart2
,IWorkbenchPart3
,IWorkbenchPartOrientation
,ITabbedPropertySheetPageContributor
,IVisualisationInputListener
,IVisualization<T>
- Direct Known Subclasses:
JFreeChartEditor
public abstract class AbstractEditor<T extends AbstractVisualizationSingleDatastreamInput>
extends EditorPart
implements IVisualization<T>, IVisualisationInputListener
Default implementation of an
EditorPart
. Provides common functionality, which all editors
that want to display experiment data must have. Also enables the tabbed properties view.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This editor's ID, e.g.protected AbstractVisualizationInput<T>
The input for this Editor.protected Composite
The composite of the parent element, for reference if a new chart is added.protected TabbedPropertySheetPage
Reference on the currentTabbedPropertySheetPage
.Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDropSupport
(Control control) void
createPartControl
(Composite parent) protected ISelectionProvider
Creates a simple selection provider, which always returns just the input.void
doSave
(IProgressMonitor monitor) void
doSaveAs()
getAdapter
(Class adapter) protected abstract String
void
init
(IEditorSite site, IEditorInput input) boolean
isDirty()
boolean
void
restoreState
(IMemento memento) void
void
setFocus()
protected void
setInput
(IEditorInput input) abstract void
void
visualisationInputChanged
(boolean needsDatasetReload) Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, removePropertyListener
-
Field Details
-
EDITOR_ID
This editor's ID, e.g. for Referencing in extension points.- See Also:
-
input
The input for this Editor. -
propertySheetPage
Reference on the currentTabbedPropertySheetPage
. -
parent
The composite of the parent element, for reference if a new chart is added.
-
-
Constructor Details
-
AbstractEditor
public AbstractEditor()Default constructor.
-
-
Method Details
-
doSave
- Specified by:
doSave
in interfaceISaveablePart
- Specified by:
doSave
in classEditorPart
-
doSaveAs
public void doSaveAs()- Specified by:
doSaveAs
in interfaceISaveablePart
- Specified by:
doSaveAs
in classEditorPart
-
setInput
- Overrides:
setInput
in classEditorPart
-
init
- Specified by:
init
in interfaceIEditorPart
- Specified by:
init
in classEditorPart
- Throws:
PartInitException
-
isDirty
public boolean isDirty()- Specified by:
isDirty
in interfaceISaveablePart
- Specified by:
isDirty
in classEditorPart
-
isSaveAsAllowed
public boolean isSaveAsAllowed()- Specified by:
isSaveAsAllowed
in interfaceISaveablePart
- Specified by:
isSaveAsAllowed
in classEditorPart
-
saveState
- Specified by:
saveState
in interfaceIPersistable
-
setFocus
public void setFocus()- Specified by:
setFocus
in interfaceIWorkbenchPart
- Specified by:
setFocus
in classWorkbenchPart
-
restoreState
- Specified by:
restoreState
in interfaceIPersistableEditor
-
createSelectionProvider
Creates a simple selection provider, which always returns just the input. This selectionProvider is needed for displaying of the properties view for this editor.- Returns:
- a selection provider which selection is always the the editor input in the attribute
input
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classWorkbenchPart
-
getContributorId
- Specified by:
getContributorId
in interfaceITabbedPropertySheetPageContributor
-
getEditorInput
- Specified by:
getEditorInput
in interfaceIEditorPart
- Overrides:
getEditorInput
in classEditorPart
-
addDropSupport
-
getVisualisationInput
- Specified by:
getVisualisationInput
in interfaceIVisualization<T extends AbstractVisualizationSingleDatastreamInput>
-
createPartControl
- Specified by:
createPartControl
in interfaceIWorkbenchPart
- Specified by:
createPartControl
in classWorkbenchPart
-
getEditorName
-
visualisationInputChanged
public void visualisationInputChanged(boolean needsDatasetReload) - Specified by:
visualisationInputChanged
in interfaceIVisualisationInputListener
-
updateEditorContents
public abstract void updateEditorContents()
-