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;
}
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);
}
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();
}
}
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;
}
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
}
Aggregations