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
FieldsModifier and TypeFieldDescriptionstatic final StringThis editor's ID, e.g.protected AbstractVisualizationInput<T>The input for this Editor.protected CompositeThe composite of the parent element, for reference if a new chart is added.protected TabbedPropertySheetPageReference on the currentTabbedPropertySheetPage.Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUTFields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDropSupport(Control control) voidcreatePartControl(Composite parent) protected ISelectionProviderCreates a simple selection provider, which always returns just the input.voiddoSave(IProgressMonitor monitor) voiddoSaveAs()getAdapter(Class adapter) protected abstract Stringvoidinit(IEditorSite site, IEditorInput input) booleanisDirty()booleanvoidrestoreState(IMemento memento) voidvoidsetFocus()protected voidsetInput(IEditorInput input) abstract voidvoidvisualisationInputChanged(boolean needsDatasetReload) Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartNameMethods 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, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
doSavein interfaceISaveablePart- Specified by:
doSavein classEditorPart
-
doSaveAs
public void doSaveAs()- Specified by:
doSaveAsin interfaceISaveablePart- Specified by:
doSaveAsin classEditorPart
-
setInput
- Overrides:
setInputin classEditorPart
-
init
- Specified by:
initin interfaceIEditorPart- Specified by:
initin classEditorPart- Throws:
PartInitException
-
isDirty
public boolean isDirty()- Specified by:
isDirtyin interfaceISaveablePart- Specified by:
isDirtyin classEditorPart
-
isSaveAsAllowed
public boolean isSaveAsAllowed()- Specified by:
isSaveAsAllowedin interfaceISaveablePart- Specified by:
isSaveAsAllowedin classEditorPart
-
saveState
- Specified by:
saveStatein interfaceIPersistable
-
setFocus
public void setFocus()- Specified by:
setFocusin interfaceIWorkbenchPart- Specified by:
setFocusin classWorkbenchPart
-
restoreState
- Specified by:
restoreStatein 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:
getAdapterin interfaceIAdaptable- Overrides:
getAdapterin classWorkbenchPart
-
getContributorId
- Specified by:
getContributorIdin interfaceITabbedPropertySheetPageContributor
-
getEditorInput
- Specified by:
getEditorInputin interfaceIEditorPart- Overrides:
getEditorInputin classEditorPart
-
addDropSupport
-
getVisualisationInput
- Specified by:
getVisualisationInputin interfaceIVisualization<T extends AbstractVisualizationSingleDatastreamInput>
-
createPartControl
- Specified by:
createPartControlin interfaceIWorkbenchPart- Specified by:
createPartControlin classWorkbenchPart
-
getEditorName
-
visualisationInputChanged
public void visualisationInputChanged(boolean needsDatasetReload) - Specified by:
visualisationInputChangedin interfaceIVisualisationInputListener
-
updateEditorContents
public abstract void updateEditorContents()
-