org.eclipse.amp.escape.ide
Class ActionSetDisabler

java.lang.Object
  extended by org.eclipse.amp.escape.ide.ActionSetDisabler

public class ActionSetDisabler
extends java.lang.Object

On activation of a perspective, disables provided action sets. Note: uses Eclipse internal APIs. Note that there is not currently a mechanism to uninstall though it would be pretty simple to write one. Inspired by code snippet from Dimitri Missoh.

Author:
mparker

Constructor Summary
ActionSetDisabler()
           
 
Method Summary
static void install(java.lang.String targetPerspective, java.lang.String... disabledActionSets)
          Install a perspective listener that disable supplied action sets whenever supplied target perspective is activated.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionSetDisabler

public ActionSetDisabler()
Method Detail

install

public static void install(java.lang.String targetPerspective,
                           java.lang.String... disabledActionSets)
Install a perspective listener that disable supplied action sets whenever supplied target perspective is activated. Should only be called when platform workbench window is available, i.e. at early startup.

Parameters:
targetPerspective - the target perspective id
disabledActionSets - all actions sets that should be disabled