Search in sources :

Example 1 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup 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;
}
Also used : ActionManager(com.intellij.openapi.actionSystem.ActionManager) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 2 with DefaultActionGroup

use of com.intellij.openapi.actionSystem.DefaultActionGroup in project freeline by alibaba.

the class FreelineTerminal method createToolbar.

/**
     * 创建左侧工具栏
     *
     * @param terminalRunner
     * @param terminal
     * @param toolWindow
     * @return
     */
private ActionToolbar createToolbar(@Nullable AbstractTerminalRunner terminalRunner, @NotNull JBTabbedTerminalWidget terminal, @NotNull ToolWindow toolWindow) {
    DefaultActionGroup group = new DefaultActionGroup();
    if (terminalRunner != null) {
        group.add(new RunAction(this));
        group.add(new StopAction(this));
        group.addSeparator();
        group.add(new DebugAction(this));
        group.add(new ForceAction(this));
        group.addSeparator();
        group.add(new ClearAction(this));
    }
    return ActionManager.getInstance().createActionToolbar("unknown", group, false);
}
Also used : DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 3 with DefaultActionGroup

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

the class StudyToolWindow method getActionGroup.

@NotNull
private static DefaultActionGroup getActionGroup(@NotNull final Project project) {
    DefaultActionGroup group = new DefaultActionGroup();
    if (!StepikProjectManager.isStepikProject(project)) {
        logger.warn(project.getName() + " is not Stepik-project");
        return group;
    }
    StudyPluginConfigurator configurator = StudyUtils.getConfigurator(project);
    if (configurator != null) {
        group.addAll(configurator.getActionGroup(project));
        return group;
    } else {
        logger.warn("No configurator is provided for plugin");
        return StudyBasePluginConfigurator.getDefaultActionGroup();
    }
}
Also used : DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) StudyPluginConfigurator(org.stepik.core.StudyPluginConfigurator) NotNull(org.jetbrains.annotations.NotNull)

Example 4 with DefaultActionGroup

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

the class StepikPluginConfigurator method getActionGroup.

@NotNull
@Override
public DefaultActionGroup getActionGroup(Project project) {
    final DefaultActionGroup group = new DefaultActionGroup();
    group.add(new StepikSendAction());
    group.add(new StepikPreviousStepAction());
    group.add(new StepikNextStepAction());
    group.add(new StepikResetStepAction());
    group.add(new DownloadSubmission());
    group.add(new InsertStepikDirectives());
    return group;
}
Also used : StepikPreviousStepAction(org.stepik.plugin.actions.navigation.StepikPreviousStepAction) StepikNextStepAction(org.stepik.plugin.actions.navigation.StepikNextStepAction) InsertStepikDirectives(org.stepik.plugin.actions.step.InsertStepikDirectives) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) StepikResetStepAction(org.stepik.plugin.actions.step.StepikResetStepAction) StepikSendAction(org.stepik.plugin.actions.step.StepikSendAction) DownloadSubmission(org.stepik.plugin.actions.step.DownloadSubmission) NotNull(org.jetbrains.annotations.NotNull)

Example 5 with DefaultActionGroup

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

the class WrapInAction method fill.

public static void fill(DesignerEditorPanel designer, DefaultActionGroup group, EditableArea area) {
    List<RadComponent> selection = area.getSelection();
    if (selection.isEmpty()) {
        return;
    }
    Set<RadComponent> parents = RadComponent.getParents(selection);
    if (parents.size() != 1) {
        return;
    }
    RadComponent parent = parents.iterator().next();
    if (selection.size() > 1) {
        RadLayout layout = parent.getLayout();
        if (layout != null && !layout.isWrapIn(selection)) {
            return;
        }
    }
    WrapInProvider provider = designer.getWrapInProvider();
    if (provider == null) {
        return;
    }
    List<MetaModel> models = provider.getModels();
    if (models.isEmpty()) {
        return;
    }
    DefaultActionGroup wrapGroup = new DefaultActionGroup("Wrap In", true);
    for (MetaModel wrapModel : models) {
        wrapGroup.add(new WrapInAction(designer, area, provider, parent, selection, wrapModel));
    }
//group.add(wrapGroup); // XXX
}
Also used : MetaModel(com.intellij.designer.model.MetaModel) RadLayout(com.intellij.designer.model.RadLayout) RadComponent(com.intellij.designer.model.RadComponent) WrapInProvider(com.intellij.designer.model.WrapInProvider) 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