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