RSE
Release 1.0

org.eclipse.rse.ui
Class SystemMenuManager

java.lang.Object
  extended byorg.eclipse.rse.ui.SystemMenuManager
All Implemented Interfaces:
ISystemContextMenuConstants

public class SystemMenuManager
extends Object
implements ISystemContextMenuConstants

Override/wrapper of JFace MenuManager so we can redirect any menu additions to specific menu groups to go into pre-defined submenus.

Only exposes core set of MenuManager methods. Rest can be accessed by calling getMenuManger().


Field Summary
 
Fields inherited from interface org.eclipse.rse.ui.ISystemContextMenuConstants
GROUP_ADAPTERS, GROUP_ADDITIONS, GROUP_BROWSEWITH, GROUP_BUILD, GROUP_CHANGE, GROUP_COMPAREWITH, GROUP_CONNECTION, GROUP_EXPAND, GROUP_EXPANDTO, GROUP_GENERATE, GROUP_GOTO, GROUP_IMPORTEXPORT, GROUP_NEW, GROUP_NEW_NONCASCADING, GROUP_OPEN, GROUP_OPENTO, GROUP_OPENWITH, GROUP_PROPERTIES, GROUP_REORDER, GROUP_REORGANIZE, GROUP_REPLACEWITH, GROUP_SEARCH, GROUP_SHOW, GROUP_STARTSERVER, GROUP_TEAM, GROUP_VIEWER_SETUP, GROUP_WORKWITH, MENU_BROWSEWITH, MENU_COMPAREWITH, MENU_COMPILE, MENU_EXPANDTO, MENU_GOTO, MENU_NEW, MENU_OPENTO, MENU_OPENWITH, MENU_PREFERENCES, MENU_REPLACEWITH, MENU_STARTSERVER, MENU_USERACTIONS, MENU_WORKWITH
 
Constructor Summary
SystemMenuManager(IMenuManager menuManager)
          Constructor for SystemMenuManager
 
Method Summary
 void add(String menuGroup, IAction action)
          Special helper that intelligently adds system framework actions
 void addSeparator()
          Add a separator.
 void appendToGroup(String groupName, IAction action)
          Method declared on IContributionManager.
 void appendToGroup(String groupName, IContributionItem menuOrSeparator)
          Method declared on IContributionManager.
 IMenuManager getMenuManager()
          Get the wrapped IMenuManager manager
 IMenuManager getSpecialSubMenuByMenuID(String menuID)
           
 void prependToGroup(String groupName, IAction action)
          Method declared on IContributionManager.
 void prependToGroup(String groupName, IContributionItem subMenu)
          Method declared on IContributionManager.
 boolean wasMenuCreated()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemMenuManager

public SystemMenuManager(IMenuManager menuManager)
Constructor for SystemMenuManager

Parameters:
menuManager - existing JFace menu manager
Method Detail

getMenuManager

public IMenuManager getMenuManager()
Get the wrapped IMenuManager manager


appendToGroup

public void appendToGroup(String groupName,
                          IAction action)
Method declared on IContributionManager. Append an action to the menu.

Intercepted so we can direct appends to certain groups into appropriate cascading submenus.

Parameters:
groupName - group to append to. See ISystemContextMenuConstants.
action - action to append.

appendToGroup

public void appendToGroup(String groupName,
                          IContributionItem menuOrSeparator)
Method declared on IContributionManager. Append a submenu to the menu.

Intercepted so we can direct appends to certain groups into appropriate cascading submenus.

Parameters:
groupName - group to append to. See ISystemContextMenuConstants.

prependToGroup

public void prependToGroup(String groupName,
                           IAction action)
Method declared on IContributionManager. Prepend an action to the menu.

Intercepted so we can direct appends to certain groups into appropriate cascading submenus.

Parameters:
groupName - group to append to. See ISystemContextMenuConstants.
action - action to prepend.

prependToGroup

public void prependToGroup(String groupName,
                           IContributionItem subMenu)
Method declared on IContributionManager. Prepend a submenu to the menu.

Intercepted so we can direct appends to certain groups into appropriate cascading submenus.

Parameters:
groupName - group to append to. See ISystemContextMenuConstants.

addSeparator

public void addSeparator()
Add a separator. HOPEFULLY THIS IS NEVER CALLED. RATHER, BY USING GROUPS AND DECIDING PER GROUP IF THERE SHOULD BE SEPARATORS, WE AVOID HARDCODING SEPARATORS LIKE THIS.


add

public void add(String menuGroup,
                IAction action)
Special helper that intelligently adds system framework actions

Parameters:
menuGroup - default menuGroup to add to, if action doesn't contain an explicit location
action - action to add to the menu

getSpecialSubMenuByMenuID

public IMenuManager getSpecialSubMenuByMenuID(String menuID)

wasMenuCreated

public boolean wasMenuCreated()

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.