Package com.iizigo.prop
Class StandaloneEditorController
java.lang.Object
com.iizigo.prop.StandaloneEditorController
- All Implemented Interfaces:
IPropertyEditorController
A stand-alone editor controller that can be used for the Property Editor.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionStandaloneEditorController(org.eclipse.swt.widgets.Shell shell, ModuleModel model) Constructor.StandaloneEditorController(org.eclipse.swt.widgets.Shell shell, ModuleModel model, org.eclipse.core.commands.operations.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.booleanChecks for disposal.voidremovePropertyValue(GProp<?> property) Removes a property when undefined in the editors.voidsetBlockViewerFocus(boolean block) Blocks the target viewer from focus.voidsetPropertyAttrFlag(GProp<?> property, int attr, boolean flag) Sets a property attribute flag.voidsetPropertyError(GProp<?> property, String errorID, IPropErrorItem item) Sets a property error.voidsetPropertyValue(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(org.eclipse.swt.widgets.Shell shell, ModuleModel model, org.eclipse.core.commands.operations.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:
getUndoContextin interfaceIPropertyEditorController- Returns:
- An object castable to org.eclipse.core.commands.operations.IUndoContext.
getModuleModel
Gets the ModuleModel instance of the project.- Specified by:
getModuleModelin interfaceIPropertyEditorController
getMultiSelectionProvider
Gets the multi-property selection provider.- Specified by:
getMultiSelectionProviderin interfaceIPropertyEditorController
getUndoRedo
Gets the undo/redo interface.- Specified by:
getUndoRedoin interfaceIPropertyEditorController
setBlockViewerFocus
public void setBlockViewerFocus(boolean block) Blocks the target viewer from focus.- Specified by:
setBlockViewerFocusin interfaceIPropertyEditorController
isDisposed
public boolean isDisposed()Checks for disposal.- Specified by:
isDisposedin interfaceIPropertyEditorController
setPropertyError
Sets a property error. The undo/redo functionality will wrap an undo/redo action for this function.- Specified by:
setPropertyErrorin 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:
removePropertyValuein interfaceIPropertyEditorController
setPropertyAttrFlag
Sets a property attribute flag. The undo/redo functionality will wrap an undo/redo action for this function.- Specified by:
setPropertyAttrFlagin 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:
setPropertyValuein interfaceIPropertyEditorController