Search in sources :

Example 66 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-plugins by JetBrains.

the class StatusToolbarImpl method createBottomPanel.

private Component createBottomPanel() {
    DefaultActionGroup actions = new DefaultActionGroup();
    for (Class<? extends NamedUserCommand> toolbarAction : getToolbarActions()) {
        actions.add(new BaseAction(toolbarAction));
    }
    final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("BottomToolbar", actions, true);
    actionToolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
    return actionToolbar.getComponent();
}
Also used : BaseAction(jetbrains.communicator.idea.actions.BaseAction) ActionToolbar(com.intellij.openapi.actionSystem.ActionToolbar) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 67 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-plugins by JetBrains.

the class JabberIdeaUI method initPerProject.

public void initPerProject(MutablePicoContainer projectLevelContainer) {
    StatusToolbar statusToolbar = ((StatusToolbar) projectLevelContainer.getComponentInstanceOfType(StatusToolbar.class));
    if (statusToolbar != null) {
        statusToolbar.addToolbarCommand(JabberConnectionCommand.class);
    }
    if (!ourInitialized && ApplicationManager.getApplication() != null && !Pico.isUnitTest()) {
        DefaultActionGroup group = ((DefaultActionGroup) ActionManager.getInstance().getAction("IDEtalk.OptionsGroup"));
        if (group != null) {
            group.add(new EditJabberSettingsAction(), new Constraints(Anchor.FIRST, ""));
        }
        ourInitialized = true;
    }
}
Also used : StatusToolbar(jetbrains.communicator.ide.StatusToolbar) Constraints(com.intellij.openapi.actionSystem.Constraints) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 68 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.

the class CloudAccountSelectionEditor method onNewButton.

private void onNewButton() {
    if (myCloudTypes.size() == 1) {
        createAccount(ContainerUtil.getFirstItem(myCloudTypes));
        return;
    }
    DefaultActionGroup group = new DefaultActionGroup();
    for (final ServerType<?> cloudType : myCloudTypes) {
        group.add(new AnAction(cloudType.getPresentableName(), cloudType.getPresentableName(), cloudType.getIcon()) {

            @Override
            public void actionPerformed(AnActionEvent e) {
                createAccount(cloudType);
            }
        });
    }
    JBPopupFactory.getInstance().createActionGroupPopup("New Account", group, DataManager.getInstance().getDataContext(myMainPanel), JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, false).showUnderneathOf(myNewButton);
}
Also used : AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) AnAction(com.intellij.openapi.actionSystem.AnAction)

Example 69 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.

the class MoveChangesDialog method createCenterPanel.

@Override
protected JComponent createCenterPanel() {
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(ScrollPaneFactory.createScrollPane(myTreeList), BorderLayout.CENTER);
    DefaultActionGroup actionGroup = new DefaultActionGroup(myTreeList.getTreeActions());
    panel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, actionGroup, true).getComponent(), BorderLayout.NORTH);
    myTreeList.expandAll();
    myTreeList.repaint();
    return panel;
}
Also used : DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 70 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project intellij-community by JetBrains.

the class AddMultipleFilesOptionsDialog method createToolbar.

private JComponent createToolbar() {
    ActionManager actionManager = ActionManager.getInstance();
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new SelectAllAction());
    group.add(new UnselectAllAction());
    return actionManager.createActionToolbar(CvsActionPlaces.ADD_FILES_TOOLBAR, group, true).getComponent();
}
Also used : ActionManager(com.intellij.openapi.actionSystem.ActionManager) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Aggregations

DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)109 NotNull (org.jetbrains.annotations.NotNull)38 AnAction (com.intellij.openapi.actionSystem.AnAction)22 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)16 Nullable (org.jetbrains.annotations.Nullable)11 ActionManager (com.intellij.openapi.actionSystem.ActionManager)8 ActionGroup (com.intellij.openapi.actionSystem.ActionGroup)7 Separator (com.intellij.openapi.actionSystem.Separator)7 ListPopup (com.intellij.openapi.ui.popup.ListPopup)7 Content (com.intellij.ui.content.Content)6 BrowserHelpAction (com.android.tools.idea.actions.BrowserHelpAction)5 Project (com.intellij.openapi.project.Project)5 VirtualFile (com.intellij.openapi.vfs.VirtualFile)5 List (java.util.List)5 RecordingAction (com.android.tools.idea.monitor.actions.RecordingAction)4 ActionToolbar (com.intellij.openapi.actionSystem.ActionToolbar)4 DumbAwareAction (com.intellij.openapi.project.DumbAwareAction)4 javax.swing (javax.swing)4 FolderConfiguration (com.android.ide.common.resources.configuration.FolderConfiguration)3 CommonActionsManager (com.intellij.ide.CommonActionsManager)3