Package com.iizigo.prop
Class StandaloneEditorController
java.lang.Object
com.iizigo.prop.StandaloneEditorController
- All Implemented Interfaces:
IPropertyEditorController
,IDisposedPart
A stand-alone editor controller that can be used for the Property Editor.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorDescriptionStandaloneEditorController
(Shell shell, ModuleModel model) Constructor.StandaloneEditorController
(Shell shell, ModuleModel model, IUndoContext undoContext, Runnable updateStates, IPropUndoRedo undoRedo, MultiSelectionProvider multiSelectionProvider) Constructor.Method Summary
Modifier and TypeMethodDescriptionGets the ModuleModel instance of the project.Gets the multi-property selection provider.Gets the undo context.Gets the undo/redo interface.boolean
Checks for disposal.void
removePropertyValue
(GProp<?> property) Removes a property when undefined in the editors.void
setBlockViewerFocus
(boolean block) Blocks the target viewer from focus.void
setPropertyAttrFlag
(GProp<?> property, int attr, boolean flag) Sets a property attribute flag.void
setPropertyError
(GProp<?> property, String errorID, IPropErrorItem item) Sets a property error.void
setPropertyValue
(PropCnr parent, GProp<?> property, Object value) Sets a property value.
Constructor Details
StandaloneEditorController
Constructor.- Parameters:
shell
- The shell.model
- The Module model.
StandaloneEditorController
public StandaloneEditorController(Shell shell, ModuleModel model, IUndoContext undoContext, Runnable updateStates, IPropUndoRedo undoRedo, MultiSelectionProvider multiSelectionProvider) Constructor.- Parameters:
shell
- The shell.model
- The Module model.undoContext
- The undo context to use, null for none.updateStates
- Runnable called when states needs to update, null for none.undoRedo
- Undo/redo instance, null to create one in the stand-alone controller.multiSelectionProvider
- The MultiSelectionProvider instance, null to create one in the stand-alone controller.
Method Details
getUndoContext
Gets the undo context.- Specified by:
getUndoContext
in interfaceIPropertyEditorController
- Returns:
- An object castable to org.eclipse.core.commands.operations.IUndoContext.
getModuleModel
Gets the ModuleModel instance of the project.- Specified by:
getModuleModel
in interfaceIPropertyEditorController
getMultiSelectionProvider
Gets the multi-property selection provider.- Specified by:
getMultiSelectionProvider
in interfaceIPropertyEditorController
getUndoRedo
Gets the undo/redo interface.- Specified by:
getUndoRedo
in interfaceIPropertyEditorController
setBlockViewerFocus
public void setBlockViewerFocus(boolean block) Blocks the target viewer from focus.- Specified by:
setBlockViewerFocus
in interfaceIPropertyEditorController
isDisposed
public boolean isDisposed()Checks for disposal.- Specified by:
isDisposed
in interfaceIDisposedPart
- Specified by:
isDisposed
in interfaceIPropertyEditorController
- Returns:
- true if disposed of, false otherwise.
setPropertyError
Sets a property error. The undo/redo functionality will wrap an undo/redo action for this function.- Specified by:
setPropertyError
in interfaceIPropertyEditorController
removePropertyValue
Removes a property when undefined in the editors. The undo/redo functionality will wrap an undo/redo action for this function.- Specified by:
removePropertyValue
in interfaceIPropertyEditorController
setPropertyAttrFlag
Sets a property attribute flag. The undo/redo functionality will wrap an undo/redo action for this function.- Specified by:
setPropertyAttrFlag
in interfaceIPropertyEditorController
setPropertyValue
Sets a property value. The undo/redo functionality will wrap an undo/redo action for this function. This method handles setting a property value that is extended in the parent and the new property is to replace it in the parent.- Specified by:
setPropertyValue
in interfaceIPropertyEditorController