Package com.iizigo.editor
Class ContextMenuContributorAdapter
- java.lang.Object
- com.iizigo.editor.ContextMenuContributorAdapter
- All Implemented Interfaces:
IContextMenuContributor
,IContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
public class ContextMenuContributorAdapter extends java.lang.Object implements IContextMenuContributor
Adapter for contributions to the menu for Editor parts, whenregisterViewer
orcreateMenu
in the Editor part is called.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description ContextMenuContributorAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to append menu items.boolean
doAddExpandCollapseAll(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Checks if expand/collapse all menu items should be added.DesignerProp
getTarget()
Gets the default target when none other is found for the pop-up menu in the viewer.void
prependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to prepend menu items.
Method Detail
prependMenuItems
public void prependMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to prepend menu items.- Specified by:
prependMenuItems
in interfaceIContextMenuContributor
- Specified by:
prependMenuItems
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Parameters:
viewer
- The viewer.menu
- The pop-up menu.target
- The selected target in the viewer, null for none.
appendMenuItems
public void appendMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Called to append menu items.- Specified by:
appendMenuItems
in interfaceIContextMenuContributor
- Specified by:
appendMenuItems
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Parameters:
viewer
- The viewer.menu
- The pop-up menu.target
- The selected target in the viewer, null for none.
doAddExpandCollapseAll
public boolean doAddExpandCollapseAll(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, DesignerProp target)
Checks if expand/collapse all menu items should be added.- Specified by:
doAddExpandCollapseAll
in interfaceIContextMenuContributor
getTarget
public DesignerProp getTarget()
Gets the default target when none other is found for the pop-up menu in the viewer.- Specified by:
getTarget
in interfaceIContextMenuContributor
- Specified by:
getTarget
in interfaceIContextMenuContributorFormControl<org.eclipse.jface.viewers.Viewer>
- Returns:
- The target, or null to use the default edited property.