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 anEditorPart. Provides common functionality, which all editors that want to display experiment data must have. Also enables the tabbed properties view.
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDITOR_IDThis editor's ID, e.g.protected AbstractVisualizationInput<T>inputThe input for this Editor.protected CompositeparentThe composite of the parent element, for reference if a new chart is added.protected TabbedPropertySheetPagepropertySheetPageReference 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
Constructors Constructor Description AbstractEditor()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDropSupport(Control control)voidcreatePartControl(Composite parent)protected ISelectionProvidercreateSelectionProvider()Creates a simple selection provider, which always returns just the input.voiddoSave(IProgressMonitor monitor)voiddoSaveAs()ObjectgetAdapter(Class adapter)StringgetContributorId()IEditorInputgetEditorInput()protected abstract StringgetEditorName()IVisualisationInput<T>getVisualisationInput()voidinit(IEditorSite site, IEditorInput input)booleanisDirty()booleanisSaveAsAllowed()voidrestoreState(IMemento memento)voidsaveState(IMemento memento)voidsetFocus()protected voidsetInput(IEditorInput input)abstract voidupdateEditorContents()voidvisualisationInputChanged(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 Detail
-
EDITOR_ID
public static final String EDITOR_ID
This editor's ID, e.g. for Referencing in extension points.- See Also:
- Constant Field Values
-
input
protected AbstractVisualizationInput<T extends AbstractVisualizationSingleDatastreamInput> input
The input for this Editor.
-
propertySheetPage
protected TabbedPropertySheetPage propertySheetPage
Reference on the currentTabbedPropertySheetPage.
-
parent
protected Composite parent
The composite of the parent element, for reference if a new chart is added.
-
-
Method Detail
-
doSave
public void doSave(IProgressMonitor monitor)
- Specified by:
doSavein interfaceISaveablePart- Specified by:
doSavein classEditorPart
-
doSaveAs
public void doSaveAs()
- Specified by:
doSaveAsin interfaceISaveablePart- Specified by:
doSaveAsin classEditorPart
-
setInput
protected void setInput(IEditorInput input)
- Overrides:
setInputin classEditorPart
-
init
public void init(IEditorSite site, IEditorInput input) throws PartInitException
- 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
public void saveState(IMemento memento)
- Specified by:
saveStatein interfaceIPersistable
-
setFocus
public void setFocus()
- Specified by:
setFocusin interfaceIWorkbenchPart- Specified by:
setFocusin classWorkbenchPart
-
restoreState
public void restoreState(IMemento memento)
- Specified by:
restoreStatein interfaceIPersistableEditor
-
createSelectionProvider
protected ISelectionProvider 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
public Object getAdapter(Class adapter)
- Specified by:
getAdapterin interfaceIAdaptable- Overrides:
getAdapterin classWorkbenchPart
-
getContributorId
public String getContributorId()
- Specified by:
getContributorIdin interfaceITabbedPropertySheetPageContributor
-
getEditorInput
public IEditorInput getEditorInput()
- Specified by:
getEditorInputin interfaceIEditorPart- Overrides:
getEditorInputin classEditorPart
-
addDropSupport
protected void addDropSupport(Control control)
-
getVisualisationInput
public IVisualisationInput<T> getVisualisationInput()
- Specified by:
getVisualisationInputin interfaceIVisualization<T extends AbstractVisualizationSingleDatastreamInput>
-
createPartControl
public void createPartControl(Composite parent)
- Specified by:
createPartControlin interfaceIWorkbenchPart- Specified by:
createPartControlin classWorkbenchPart
-
getEditorName
protected abstract String getEditorName()
-
visualisationInputChanged
public void visualisationInputChanged(boolean needsDatasetReload)
- Specified by:
visualisationInputChangedin interfaceIVisualisationInputListener
-
updateEditorContents
public abstract void updateEditorContents()
-
-