Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui
Class SystemMenuManager

java.lang.Object
  extended bycom.ibm.etools.systems.core.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
static String copyright
           
 
Fields inherited from interface com.ibm.etools.systems.core.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.
 IMenuManager getMenuManager()
          Get the wrapped IMenuManager manager
 IMenuManager getSpecialSubMenuByMenuID(String menuID)
           
 void prependToGroup(String groupName, IAction action)
          Method declared on IContributionManager.
 boolean wasMenuCreated()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
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.

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.

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()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.