Package net.officefloor.eclipse.woof
Class WoofEditor
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.EditorPart
-
- org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditor
-
- net.officefloor.eclipse.ide.editor.AbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
-
- net.officefloor.eclipse.woof.WoofEditor
-
- All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,org.eclipse.ui.IEditorPart
,org.eclipse.ui.ISaveablePart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
- Direct Known Subclasses:
WoofEditorMain
,WoofViewer
public class WoofEditor extends AbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
Web on OfficeFloor (WoOF) Editor.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.eclipse.ide.editor.AbstractIdeEclipseEditor
AbstractIdeEclipseEditor.OutsideWorkbenchLauncher
-
-
Constructor Summary
Constructors Constructor Description WoofEditor()
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
editorStyle()
Allows overriding the editor styling.java.lang.String
fileName()
Obtains the default file name for the editor.static <M extends Model,E extends java.lang.Enum<E>,I>
voidlaunchConfigurer(AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,M,E,I> configurableItem, java.util.function.Consumer<M> prototypeDecorator)
Convenience method to launchAbstractConfigurableItem
outsideIWorkbench
.protected void
loadParents(java.util.List<AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,?,?,?>> parents)
Loads theAbstractConfigurableItem
instances.protected WoofModel
loadRootModel(ConfigurationItem configurationItem)
Creates the rootModel
from theConfigurationItem
.static void
main(java.lang.String[] args)
Test editor.java.lang.String
paletteIndicatorStyle()
Allows overriding the palette indicator styling.java.lang.String
paletteStyle()
Allows overriding the palette styling.WoofModel
prototype()
Obtains root prototype.void
saveRootModel(WoofModel model, WritableConfigurationItem configurationItem)
Writes the rootModel
to theWritableConfigurationItem
.-
Methods inherited from class net.officefloor.eclipse.ide.editor.AbstractIdeEclipseEditor
activate, createOperations, dispose, doSave, doSaveAs, getCanvas, getContentViewer, getEditorStyleId, getOsgiBridge, getPaletteIndicatorStyleId, getPaletteStyleId, getParents, hookViewers, init, isSaveAsAllowed, launch, launch, launchOutsideWorkbench, setInput, setSelectOnly, setSite, translateStyle
-
Methods inherited from class org.eclipse.gef.mvc.fx.ui.parts.AbstractFXEditor
createActions, createPartControl, deactivate, disposeActions, getAdapter, getDomain, init, isDirty, markNonDirty, setFocus, unhookViewers
-
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName
-
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setTitle, setTitleImage, setTitleToolTip, showBusy
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Test editor.- Parameters:
args
- Command line arguments.- Throws:
java.lang.Exception
- If fails to run.
-
launchConfigurer
public static <M extends Model,E extends java.lang.Enum<E>,I> void launchConfigurer(AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,M,E,I> configurableItem, java.util.function.Consumer<M> prototypeDecorator)
Convenience method to launchAbstractConfigurableItem
outsideIWorkbench
.- Type Parameters:
M
-Model
type.E
-Model
event type.I
- Item type.- Parameters:
configurableItem
-AbstractConfigurableItem
.prototypeDecorator
- Optional prototype decorator.
-
fileName
public java.lang.String fileName()
Description copied from class:AbstractIdeEclipseEditor
Obtains the default file name for the editor.- Specified by:
fileName
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Default file name for the editor.
- See Also:
AbstractNewWizard
-
prototype
public WoofModel prototype()
Description copied from class:AbstractIdeEclipseEditor
Obtains root prototype.- Specified by:
prototype
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Root prototype.
-
paletteStyle
public java.lang.String paletteStyle()
Description copied from class:AbstractIdeEclipseEditor
Allows overriding the palette styling.- Overrides:
paletteStyle
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Palette styling. May be
null
for default styling.
-
paletteIndicatorStyle
public java.lang.String paletteIndicatorStyle()
Description copied from class:AbstractIdeEclipseEditor
Allows overriding the palette indicator styling.- Overrides:
paletteIndicatorStyle
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Palette indicator styling. May be
null
for default styling.
-
editorStyle
public java.lang.String editorStyle()
Description copied from class:AbstractIdeEclipseEditor
Allows overriding the editor styling.- Overrides:
editorStyle
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Editor styling. May be
null
for defaulting styling.
-
loadParents
protected void loadParents(java.util.List<AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,?,?,?>> parents)
Description copied from class:AbstractIdeEclipseEditor
Loads theAbstractConfigurableItem
instances.- Specified by:
loadParents
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Parameters:
parents
-List
to be populated with theAbstractConfigurableItem
instances.
-
loadRootModel
protected WoofModel loadRootModel(ConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractIdeEclipseEditor
Creates the rootModel
from theConfigurationItem
.- Specified by:
loadRootModel
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Parameters:
configurationItem
-ConfigurationItem
containing the configuration of theModel
.- Returns:
- Root
Model
within theConfigurationItem
. - Throws:
java.lang.Exception
- If fails to load the rootModel
from theConfigurationItem
.
-
saveRootModel
public void saveRootModel(WoofModel model, WritableConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractIdeEclipseEditor
Writes the rootModel
to theWritableConfigurationItem
.- Specified by:
saveRootModel
in classAbstractIdeEclipseEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Parameters:
model
- RootModel
to be saved.configurationItem
-WritableConfigurationItem
.- Throws:
java.lang.Exception
- If fails to save the rootModel
into theWritableConfigurationItem
.
-
-