Class OutlineContextMenuContribution
- All Implemented Interfaces:
IOutlineContribution
Contributes an empty menu which has no id and is not eligible for extension. Subclasses may override corresponding methods to configure the menu as necessary.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcontextMenuAboutToShow(org.eclipse.jface.action.IMenuManager manager) Notifies that the context menu of the outline page is about to be shown by the given menu manager.voiddispose()Disposes of this contribution.protected StringReturns the unique id to use for registration the context menu with the workbench, ornullif the menu is not eligible for extension.protected StringReturns the id of the context menu manager, ornullif the menu has no id.voidinit(ICommonOutlinePage outlinePage) Initializes this contribution.Methods inherited from class org.eclipse.handly.ui.outline.OutlineContribution
getOutlinePage
-
Constructor Details
-
OutlineContextMenuContribution
public OutlineContextMenuContribution()
-
-
Method Details
-
init
Initializes this contribution. This method is called after the outline page's tree viewer has been created.This method may be extended by subclasses. Subclasses must call the superclass implementation.
OutlineContextMenuContributionextends this method to create a context menu for the outline page's tree viewer. The menu will have id as computed bygetContextMenuId()and will invokecontextMenuAboutToShow(IMenuManager)when it is about to be shown. If anextension idis provided, the menu will be registered with the workbench for extension.- Specified by:
initin interfaceIOutlineContribution- Overrides:
initin classOutlineContribution- Parameters:
outlinePage- the contribution's outline page (nevernull)
-
dispose
public void dispose()Description copied from class:OutlineContributionDisposes of this contribution. Implementors should clean up any resources associated with this contribution. Note that there is no guarantee thatinit()has been called. This method has no effect if this contribution has already been disposed.This method may be extended by subclasses. Subclasses must call the superclass implementation.
- Specified by:
disposein interfaceIOutlineContribution- Overrides:
disposein classOutlineContribution
-
getContextMenuId
Returns the id of the context menu manager, ornullif the menu has no id.Default implementation returns
null. Subclasses may override this method. -
getContextMenuExtensionId
Returns the unique id to use for registration the context menu with the workbench, ornullif the menu is not eligible for extension.Default implementation returns
null. Subclasses may override this method. -
contextMenuAboutToShow
protected void contextMenuAboutToShow(org.eclipse.jface.action.IMenuManager manager) Notifies that the context menu of the outline page is about to be shown by the given menu manager.Default implementation contributes
IWorkbenchActionConstants.MB_ADDITIONSgroup if the context menu was registered with the workbench for extension. Subclasses may extend this method and contribute other items.- Parameters:
manager- the menu manager (nevernull)
-