R - Root Model type.O - Change operations type.public abstract class AbstractIdeEditor<R extends net.officefloor.model.Model,RE extends java.lang.Enum<RE>,O>
extends org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditor
OfficeFloorModel editor.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractIdeEditor.OutsideWorkbenchLauncher
Logic to launch outside the
IWorkbench. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIdeEditor(AdaptedEditorModule module,
java.lang.Class<R> rootModelType,
java.util.function.Function<R,O> createOperations)
Instantiate to capture
AdaptedEditorModule. |
|
AbstractIdeEditor(java.lang.Class<R> rootModelType,
java.util.function.Function<R,O> createOperations)
Instantiate with default
AdaptedEditorModule. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate() |
O |
createOperations(R model)
Creates the operations for the root
Model. |
void |
dispose() |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
doSaveAs() |
java.lang.String |
editorStyle()
Allows overriding the editor styling.
|
abstract java.lang.String |
fileName()
Obtains the default file name for the editor.
|
FXCanvas |
getCanvas() |
org.eclipse.gef.mvc.fx.viewer.IViewer |
getContentViewer() |
java.lang.String |
getEditorStyleId()
Obtains the
IPreferenceStore identifier for the editor styling. |
protected OfficeFloorOsgiBridge |
getOsgiBridge()
Obtains the
OfficeFloorOsgiBridge. |
java.lang.String |
getPaletteIndicatorStyleId()
Obtains the
IPreferenceStore identifier for the palette indicator
styling. |
java.lang.String |
getPaletteStyleId()
Obtains the
IPreferenceStore identifier for the palette styling. |
AbstractConfigurableItem<R,RE,O,?,?,?>[] |
getParents()
Obtains the
AbstractConfigurableItem instances. |
protected void |
hookViewers() |
protected void |
init(AbstractItem.ConfigurableContext<R,O> context)
Allows overriding to initialise the
AbstractIdeEditor. |
boolean |
isSaveAsAllowed() |
static void |
launch(java.io.File configurationFile)
Convenience method to launch the
AbstractIdeEditor implementation
outside the IWorkbench. |
static void |
launch(java.lang.String configuration)
Convenience method to launch the
AbstractIdeEditor implementation
outside the IWorkbench. |
static void |
launchOutsideWorkbench(AbstractIdeEditor.OutsideWorkbenchLauncher launcher)
Enables running the
AbstractIdeEditor outside of the
IWorkbench. |
protected abstract void |
loadParents(java.util.List<AbstractConfigurableItem<R,RE,O,?,?,?>> parents)
Loads the
AbstractConfigurableItem instances. |
protected abstract R |
loadRootModel(net.officefloor.configuration.ConfigurationItem configurationItem)
Creates the root
Model from the ConfigurationItem. |
java.lang.String |
paletteIndicatorStyle()
Allows overriding the palette indicator styling.
|
java.lang.String |
paletteStyle()
Allows overriding the palette styling.
|
abstract R |
prototype()
Obtains root prototype.
|
abstract void |
saveRootModel(R model,
net.officefloor.configuration.WritableConfigurationItem configurationItem)
Writes the root
Model to the WritableConfigurationItem. |
protected void |
setInput(org.eclipse.ui.IEditorInput input) |
void |
setSelectOnly(SelectOnly selectOnly)
Instantiate.
|
protected void |
setSite(org.eclipse.ui.IWorkbenchPartSite site) |
static java.lang.String |
translateStyle(java.lang.String rawStyle,
AbstractItem<?,?,?,?,?,?> item)
Translates the style with the details of the item being rendered.
|
createActions, createPartControl, deactivate, disposeActions, getAdapter, getDomain, init, isDirty, markNonDirty, setFocus, unhookViewerscheckSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartNameaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setTitle, setTitleImage, setTitleToolTip, showBusyaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectprotected AbstractIdeEditor(AdaptedEditorModule module, java.lang.Class<R> rootModelType, java.util.function.Function<R,O> createOperations)
Instantiate to capture AdaptedEditorModule.
Allows for alternate AdaptedEditorModule implementation.
module - AdaptedEditorModule.rootModelType - Root Model type.createOperations - Function to create the operations from the
root Model.public AbstractIdeEditor(java.lang.Class<R> rootModelType, java.util.function.Function<R,O> createOperations)
AdaptedEditorModule.rootModelType - Root Model type.createOperations - Function to create the operations from the
root Model.public static java.lang.String translateStyle(java.lang.String rawStyle,
AbstractItem<?,?,?,?,?,?> item)
rawStyle - Raw style to be translated.item - AbstractItem.public static void launchOutsideWorkbench(AbstractIdeEditor.OutsideWorkbenchLauncher launcher)
AbstractIdeEditor outside of the
IWorkbench.launcher - AbstractIdeEditor.OutsideWorkbenchLauncher.public static void launch(java.io.File configurationFile)
AbstractIdeEditor implementation
outside the IWorkbench.configurationFile - File containing the configuration.public static void launch(java.lang.String configuration)
AbstractIdeEditor implementation
outside the IWorkbench.configuration - Configuration of ConfigurationItem to launch the
AbstractIdeEditor.public java.lang.String getPaletteIndicatorStyleId()
IPreferenceStore identifier for the palette indicator
styling.IPreferenceStore identifier for the palette indicator
styling.public java.lang.String getPaletteStyleId()
IPreferenceStore identifier for the palette styling.IPreferenceStore identifier for the palette styling.public java.lang.String getEditorStyleId()
IPreferenceStore identifier for the editor styling.IPreferenceStore identifier for the editor styling.public void setSelectOnly(SelectOnly selectOnly)
selectOnly - SelectOnly.protected void init(AbstractItem.ConfigurableContext<R,O> context)
AbstractIdeEditor.context - AbstractItem.ConfigurableContext.public final AbstractConfigurableItem<R,RE,O,?,?,?>[] getParents()
AbstractConfigurableItem instances.AbstractConfigurableItem instances.public abstract java.lang.String fileName()
AbstractNewWizardpublic abstract R prototype()
protected abstract void loadParents(java.util.List<AbstractConfigurableItem<R,RE,O,?,?,?>> parents)
AbstractConfigurableItem instances.parents - List to be populated with the
AbstractConfigurableItem instances.protected abstract R loadRootModel(net.officefloor.configuration.ConfigurationItem configurationItem) throws java.lang.Exception
Model from the ConfigurationItem.configurationItem - ConfigurationItem containing the
configuration of the Model.Model within the ConfigurationItem.java.lang.Exception - If fails to load the root Model from the
ConfigurationItem.public abstract void saveRootModel(R model, net.officefloor.configuration.WritableConfigurationItem configurationItem) throws java.lang.Exception
Model to the WritableConfigurationItem.model - Root Model to be saved.configurationItem - WritableConfigurationItem.java.lang.Exception - If fails to save the root Model into the
WritableConfigurationItem.public java.lang.String paletteStyle()
null for default styling.public java.lang.String paletteIndicatorStyle()
null for default
styling.public java.lang.String editorStyle()
null for defaulting styling.public O createOperations(R model)
Model.model - Root Model.protected final OfficeFloorOsgiBridge getOsgiBridge() throws java.lang.Exception
OfficeFloorOsgiBridge.OfficeFloorOsgiBridge.java.lang.Exception - If fails to obtain the OfficeFloorOsgiBridge.public FXCanvas getCanvas()
getCanvas in class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditorpublic final org.eclipse.gef.mvc.fx.viewer.IViewer getContentViewer()
getContentViewer in class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditorprotected final void hookViewers()
hookViewers in class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditorprotected final void activate()
activate in class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditorprotected final void setInput(org.eclipse.ui.IEditorInput input)
setInput in class org.eclipse.ui.part.EditorPartprotected final void setSite(org.eclipse.ui.IWorkbenchPartSite site)
setSite in class org.eclipse.ui.part.WorkbenchPartpublic final void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPartpublic boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.ui.part.EditorPartpublic void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.ui.part.EditorPartpublic void dispose()
dispose in interface org.eclipse.ui.IWorkbenchPartdispose in class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditorCopyright © 2005–2018. All rights reserved.