Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.internal
Class PopupMenuExtender  view PopupMenuExtender download PopupMenuExtender.java

java.lang.Object
  extended byorg.eclipse.ui.internal.PopupMenuExtender
All Implemented Interfaces:
org.eclipse.jface.action.IMenuListener

public class PopupMenuExtender
extends java.lang.Object
implements org.eclipse.jface.action.IMenuListener

This class extends a single popup menu


Nested Class Summary
static class PopupMenuExtender.PopupMenuExtenderManager
           
 
Field Summary
private static PopupMenuExtender.PopupMenuExtenderManager manager
           
private  org.eclipse.jface.action.MenuManager menu
           
private  java.lang.String menuID
           
private  org.eclipse.jface.action.SubMenuManager menuWrapper
           
private  org.eclipse.ui.IWorkbenchPart part
           
private  org.eclipse.jface.viewers.ISelectionProvider selProvider
           
private  ViewerActionBuilder staticActionBuilder
           
 
Constructor Summary
PopupMenuExtender(java.lang.String id, org.eclipse.jface.action.MenuManager menu, org.eclipse.jface.viewers.ISelectionProvider prov, org.eclipse.ui.IWorkbenchPart part)
          Construct a new menu extender.
 
Method Summary
private  void addObjectActions(org.eclipse.jface.action.IMenuManager mgr)
          Contributes items registered for the object type(s) in the current selection.
private  void addStaticActions(org.eclipse.jface.action.IMenuManager mgr)
          Adds static items to the context menu.
 void dispose()
          Dispose of the menu extender.
static PopupMenuExtender.PopupMenuExtenderManager getManager()
           
 java.lang.String getMenuId()
          Return the menu identifier
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager mgr)
          Notifies the listener that the menu is about to be shown.
private  void readStaticActions()
          Read static items for the context menu.
private  void testForAdditions()
          Checks for the existance of an MB_ADDITIONS group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

private static final PopupMenuExtender.PopupMenuExtenderManager manager

menuID

private java.lang.String menuID

menu

private org.eclipse.jface.action.MenuManager menu

menuWrapper

private org.eclipse.jface.action.SubMenuManager menuWrapper

selProvider

private org.eclipse.jface.viewers.ISelectionProvider selProvider

part

private org.eclipse.ui.IWorkbenchPart part

staticActionBuilder

private ViewerActionBuilder staticActionBuilder
Constructor Detail

PopupMenuExtender

public PopupMenuExtender(java.lang.String id,
                         org.eclipse.jface.action.MenuManager menu,
                         org.eclipse.jface.viewers.ISelectionProvider prov,
                         org.eclipse.ui.IWorkbenchPart part)
Construct a new menu extender.

Method Detail

getManager

public static final PopupMenuExtender.PopupMenuExtenderManager getManager()

getMenuId

public java.lang.String getMenuId()
Return the menu identifier


addObjectActions

private void addObjectActions(org.eclipse.jface.action.IMenuManager mgr)
Contributes items registered for the object type(s) in the current selection.


addStaticActions

private void addStaticActions(org.eclipse.jface.action.IMenuManager mgr)
Adds static items to the context menu.


menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager mgr)
Notifies the listener that the menu is about to be shown.

Specified by:
menuAboutToShow in interface org.eclipse.jface.action.IMenuListener

readStaticActions

private void readStaticActions()
Read static items for the context menu.


testForAdditions

private void testForAdditions()
Checks for the existance of an MB_ADDITIONS group.


dispose

public void dispose()
Dispose of the menu extender. Should only be called when the part is disposed.