use of com.intellij.openapi.actionSystem.ActionManager in project buck by facebook.
the class BuckToolWindowFactory method getLeftToolbarActions.
public ActionGroup getLeftToolbarActions(final Project project) {
ActionManager actionManager = ActionManager.getInstance();
DefaultActionGroup group = new DefaultActionGroup();
group.add(actionManager.getAction("buck.ChooseTarget"));
group.addSeparator();
group.add(actionManager.getAction("buck.Build"));
group.add(actionManager.getAction("buck.Test"));
group.add(actionManager.getAction("buck.Install"));
group.add(actionManager.getAction("buck.InstallDebug"));
group.add(actionManager.getAction("buck.Uninstall"));
group.add(actionManager.getAction("buck.Kill"));
group.add(actionManager.getAction("buck.ProjectGeneration"));
Logger.getInstance(this.getClass()).info("getLeftToolbarActions");
return group;
}
use of com.intellij.openapi.actionSystem.ActionManager in project intellij-community by JetBrains.
the class SvnQuickListContentProvider method getVcsActions.
public List<AnAction> getVcsActions(@Nullable Project project, @Nullable AbstractVcs activeVcs, @Nullable DataContext dataContext) {
if (activeVcs == null || !SvnVcs.VCS_NAME.equals(activeVcs.getName())) {
return null;
}
final ActionManager manager = ActionManager.getInstance();
final List<AnAction> actions = new ArrayList<>();
add("Subversion.Copy", manager, actions);
add("Subversion.Clenaup", manager, actions);
return actions;
}
use of com.intellij.openapi.actionSystem.ActionManager in project intellij-community by JetBrains.
the class PyCharmEduInitialConfigurator method unregisterAction.
private static void unregisterAction(String actionId, String groupId) {
ActionManager actionManager = ActionManager.getInstance();
AnAction action = actionManager.getAction(actionId);
if (action != null) {
AnAction actionGroup = actionManager.getAction(groupId);
if (actionGroup != null && actionGroup instanceof DefaultActionGroup) {
((DefaultActionGroup) actionGroup).remove(action);
actionManager.unregisterAction(actionId);
}
}
}
use of com.intellij.openapi.actionSystem.ActionManager in project ideavim by JetBrains.
the class KeyHandler method executeAction.
/**
* Execute an action by name
*
* @param name The name of the action to execute
* @param context The context to run it in
*/
public static boolean executeAction(@NotNull String name, @NotNull DataContext context) {
ActionManager aMgr = ActionManager.getInstance();
AnAction action = aMgr.getAction(name);
return action != null && executeAction(action, context);
}
use of com.intellij.openapi.actionSystem.ActionManager in project intellij-community by JetBrains.
the class MacGestureAdapter method swipedRight.
@Override
public void swipedRight(SwipeEvent event) {
ActionManager actionManager = ActionManager.getInstance();
AnAction back = actionManager.getAction("Back");
if (back == null)
return;
actionManager.tryToExecute(back, createMouseEventWrapper(myFrame), null, null, false);
}
Aggregations