use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-community by JetBrains.
the class MethodHierarchyBrowser method createTrees.
@Override
protected void createTrees(@NotNull Map<String, JTree> trees) {
final JTree tree = createTree(false);
ActionGroup group = (ActionGroup) ActionManager.getInstance().getAction(IdeActions.GROUP_METHOD_HIERARCHY_POPUP);
PopupHandler.installPopupHandler(tree, group, ActionPlaces.METHOD_HIERARCHY_VIEW_POPUP, ActionManager.getInstance());
final BaseOnThisMethodAction action = new BaseOnThisMethodAction();
action.registerCustomShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_METHOD_HIERARCHY).getShortcutSet(), tree);
trees.put(METHOD_TYPE, tree);
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-community by JetBrains.
the class GitBranchPopup method createRepositoriesActions.
@NotNull
@Override
protected DefaultActionGroup createRepositoriesActions() {
DefaultActionGroup popupGroup = new DefaultActionGroup(null, false);
popupGroup.addSeparator("Repositories");
List<ActionGroup> rootActions = DvcsUtil.sortRepositories(myRepositoryManager.getRepositories()).stream().map(repo -> new RootAction<>(repo, highlightCurrentRepo() ? myCurrentRepository : null, new GitBranchPopupActions(repo.getProject(), repo).createActions(), GitBranchUtil.getDisplayableBranchText(repo))).collect(toList());
wrapWithMoreActionIfNeeded(myProject, popupGroup, rootActions, rootActions.size() > MAX_NUM ? DEFAULT_NUM : MAX_NUM, SHOW_ALL_REPOSITORIES);
return popupGroup;
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-community by JetBrains.
the class ConsoleManager method createConsole.
private void createConsole(@NotNull final NetService netService) {
TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(netService.getProject());
netService.configureConsole(consoleBuilder);
console = consoleBuilder.getConsole();
ApplicationManager.getApplication().invokeLater(() -> {
ActionGroup actionGroup = netService.getConsoleToolWindowActions();
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, actionGroup, false);
SimpleToolWindowPanel toolWindowPanel = new SimpleToolWindowPanel(false, true);
toolWindowPanel.setContent(console.getComponent());
toolWindowPanel.setToolbar(toolbar.getComponent());
ToolWindow toolWindow = ToolWindowManager.getInstance(netService.getProject()).registerToolWindow(netService.getConsoleToolWindowId(), false, ToolWindowAnchor.BOTTOM, netService.getProject(), true);
toolWindow.setIcon(netService.getConsoleToolWindowIcon());
Content content = ContentFactory.SERVICE.getInstance().createContent(toolWindowPanel, "", false);
Disposer.register(content, console);
toolWindow.getContentManager().addContent(content);
}, netService.getProject().getDisposed());
}
use of com.intellij.openapi.actionSystem.ActionGroup in project azure-tools-for-java by Microsoft.
the class AzureActionsComponent method initComponent.
public void initComponent() {
if (!AzurePlugin.IS_ANDROID_STUDIO) {
initAuthManage();
ActionManager am = ActionManager.getInstance();
DefaultActionGroup toolbarGroup = (DefaultActionGroup) am.getAction(IdeActions.GROUP_MAIN_TOOLBAR);
toolbarGroup.addAll((DefaultActionGroup) am.getAction("AzureToolbarGroup"));
DefaultActionGroup popupGroup = (DefaultActionGroup) am.getAction(IdeActions.GROUP_PROJECT_VIEW_POPUP);
popupGroup.add(am.getAction("AzurePopupGroup"));
if (PlatformUtils.isIdeaUltimate()) {
ActionManager actionManager = ActionManager.getInstance();
DefaultActionGroup actionGroup = (DefaultActionGroup) actionManager.getAction("PublishGroup");
if (actionGroup != null)
actionGroup.addAll((ActionGroup) actionManager.getAction("AzureWebDeployGroup"));
}
}
try {
PlatformDependent.isAndroid();
} catch (Throwable ignored) {
DefaultLoader.getUIHelper().showError("A problem with your Android Support plugin setup is preventing the Azure Toolkit from functioning correctly (Retrofit2 and RxJava failed to initialize).\n" + "To fix this issue, try disabling the Android Support plugin or installing the Android SDK", "Azure Toolkit for IntelliJ");
// DefaultLoader.getUIHelper().showException("Android Support Error: isAndroid() throws " + ignored.getMessage(), ignored, "Error Android", true, false);
}
}
use of com.intellij.openapi.actionSystem.ActionGroup in project intellij-plugins by JetBrains.
the class SplitEditorToolbar method createToolbarFromGroupId.
@NotNull
private static ActionToolbar createToolbarFromGroupId(@NotNull String groupId) {
final ActionManager actionManager = ActionManager.getInstance();
if (!actionManager.isGroup(groupId)) {
throw new IllegalStateException(groupId + " should have been a group");
}
final ActionGroup group = ((ActionGroup) actionManager.getAction(groupId));
final ActionToolbarImpl editorToolbar = ((ActionToolbarImpl) actionManager.createActionToolbar(ActionPlaces.EDITOR_TOOLBAR, group, true));
editorToolbar.setOpaque(false);
editorToolbar.setBorder(new JBEmptyBorder(0, 2, 0, 2));
return editorToolbar;
}
Aggregations