Package com.iizigo.editor
Class ContextMenuItem
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
com.iizigo.editor.ContextMenuItem
The Add Item class for a DesignerProp class. This class serves multiple purposes, i.e. to be the Command Contribution Item, the Command and the Handler for the Command, all in one.
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescriptionThe Eclipse constructor.- ContextMenuItem- (String label, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.- ContextMenuItem- (String label, String mnemonic, int accelerator, ImageDescriptor icon, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.- ContextMenuItem- (String label, String mnemonic, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.- ContextMenuItem- (String label, String mnemonic, ImageDescriptor icon, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.- ContextMenuItem- (String label, ImageDescriptor icon, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.
- Method SummaryModifier and TypeMethodDescriptionGets the command contribution item.- createMenuItem- (DesignerProp target, Control control, IzMenu menu, IPropUndoRedo undoRedo) Creates a menu item for this Add-Item.- createMenuItem- (Viewer viewer, IzMenu menu, IPropUndoRedo undoRedo) Creates a menu item for this Add-Item.- booleanChecks if this item requires a separator before.- execute- (ExecutionEvent event) Performs the Handler operation.Gets the command contribution item.- boolean- isEnabled- (DesignerProp target) Checks if the Add Item is enabled in order not to add it in a pop-up menu if disabled.- voidAdds a separator before this item.- Methods inherited from class org.eclipse.core.commands.AbstractHandler- addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled- Methods inherited from class org.eclipse.core.commands.common.EventManager- addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- Field Details- HANDLER_IDThis Handler ID.
- acceleratorpublic final int acceleratorThe accelerator.
 
- Constructor Details- ContextMenuItempublic ContextMenuItem()The Eclipse constructor.
- ContextMenuItemCreates the Add Item instance for a DesignerProp class.
- ContextMenuItemCreates the Add Item instance for a DesignerProp class.
- ContextMenuItemCreates the Add Item instance for a DesignerProp class.
- ContextMenuItempublic ContextMenuItem- (String label, String mnemonic, ImageDescriptor icon, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.
- ContextMenuItempublic ContextMenuItem- (String label, String mnemonic, int accelerator, ImageDescriptor icon, IContextMenuAction adder) Creates the Add Item instance for a DesignerProp class.
 
- Method Details- setSeparatorBeforepublic void setSeparatorBefore()Adds a separator before this item.
- doAddSeparatorpublic boolean doAddSeparator()Checks if this item requires a separator before.
- isEnabledChecks if the Add Item is enabled in order not to add it in a pop-up menu if disabled.
- getCommandContributionItemGets the command contribution item.
- createCommandContributionItemGets the command contribution item.
- executePerforms the Handler operation.- Throws:
- ExecutionException
 
- createMenuItemCreates a menu item for this Add-Item.
- createMenuItempublic IzMenuItem createMenuItem- (DesignerProp target, Control control, IzMenu menu, IPropUndoRedo undoRedo) Creates a menu item for this Add-Item.