public abstract class AbstractFXEditor
extends org.eclipse.ui.part.EditorPart
HistoricizingDomain
,
IFXCanvasFactory
, and ISelectionProvider
are injected into
the editor on construction.Constructor and Description |
---|
AbstractFXEditor(Injector injector)
Constructs a new
AbstractFXEditor and uses the given
Injector to inject its members. |
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Activates the editor by activating its
IDomain . |
protected void |
createActions()
Creates the actions for this editor and registers them in the editor's
site action bar.
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent) |
protected void |
deactivate()
Deactivates the editor by deactivating its
IDomain . |
void |
dispose() |
protected void |
disposeActions()
Dispose the actions created by this editor.
|
java.lang.Object |
getAdapter(java.lang.Class key) |
protected javafx.embed.swt.FXCanvas |
getCanvas()
Returns the
FXCanvas that was previously created by the
IFXCanvasFactory which was previously injected into this editor. |
IViewer |
getContentViewer()
|
IDomain |
getDomain()
Returns the
IDomain that was previously injected into this
editor. |
protected void |
hookViewers()
Hooks all viewers that are part of this editor into the
FXCanvas . |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input) |
boolean |
isDirty() |
protected void |
markNonDirty()
Marks the current state of the editor to be non-dirty.
|
void |
setFocus() |
protected void |
unhookViewers()
Unhooks all viewers that are part of this editor.
|
checkSite, doSave, doSaveAs, getEditorInput, getEditorSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public AbstractFXEditor(Injector injector)
AbstractFXEditor
and uses the given
Injector
to inject its members.injector
- The Injector
that is used to inject the editor's
members.protected void activate()
IDomain
.protected void createActions()
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
protected void deactivate()
IDomain
.public void dispose()
dispose
in interface org.eclipse.ui.IWorkbenchPart
dispose
in class org.eclipse.ui.part.WorkbenchPart
protected void disposeActions()
public java.lang.Object getAdapter(java.lang.Class key)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class org.eclipse.ui.part.WorkbenchPart
protected javafx.embed.swt.FXCanvas getCanvas()
FXCanvas
that was previously created by the
IFXCanvasFactory
which was previously injected into this editor.FXCanvas
that was previously created by the
IFXCanvasFactory
.public IViewer getContentViewer()
public IDomain getDomain()
IDomain
that was previously injected into this
editor.IDomain
that was previously injected into this
editor.protected void hookViewers()
FXCanvas
.public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException
init
in interface org.eclipse.ui.IEditorPart
init
in class org.eclipse.ui.part.EditorPart
org.eclipse.ui.PartInitException
public boolean isDirty()
isDirty
in interface org.eclipse.ui.ISaveablePart
isDirty
in class org.eclipse.ui.part.EditorPart
protected void markNonDirty()
EditorPart.doSave(org.eclipse.core.runtime.IProgressMonitor)
and
EditorPart.doSaveAs()
in case of successful save.public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.WorkbenchPart
protected void unhookViewers()
Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.