org.eclipse.rse.ui
Class SystemMenuManager
java.lang.Object
org.eclipse.rse.ui.SystemMenuManager
-
public class SystemMenuManager
- extends
Object
Override/wrapper of JFace MenuManager so we can redirect any
menu additions to specific menu groups to go into
predefined submenus.
Only exposes core set of MenuManager methods. Rest can be
accessed by calling getMenuManger().
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
SystemMenuManager
public SystemMenuManager(
IMenuManager menuManager)
- Constructor for SystemMenuManager
-
Parameters:
-
menuManager
- existing JFace menu manager
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
. -
menuOrSeparator
- menu or separator 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.
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
. -
subMenu
- submenu to append.
addSeparator
public void addSeparator()
- Add a separator.
HOPEFULLY THIS IS NEVER CALLED. RATHER, BY USING ISystemContextMenuConstants.GROUPS AND DECIDING PER ISystemContextMenuConstants.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()
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.