use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij-community by JetBrains.
the class DiffSplitter method createActionComponent.
@Nullable
private static JComponent createActionComponent(@Nullable final AnAction action) {
if (action == null)
return null;
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("", new DefaultActionGroup(action), true);
toolbar.setReservePlaceAutoPopupIcon(false);
toolbar.getComponent().setCursor(Cursor.getDefaultCursor());
return toolbar.getComponent();
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project android by JetBrains.
the class NlPreviewFixture method getConfigToolbar.
@NotNull
public NlConfigurationToolbarFixture getConfigToolbar() {
ActionToolbar toolbar = myRobot.finder().findByName("NlConfigToolbar", ActionToolbarImpl.class, false);
Wait.seconds(1).expecting("Configuration toolbar to be showing").until(() -> toolbar.getComponent().isShowing());
return new NlConfigurationToolbarFixture(myRobot, GuiTests.waitUntilShowing(myRobot, Matchers.byType(DesignSurface.class)), toolbar);
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij-community by JetBrains.
the class GradleToolWindowPanel method initContent.
public void initContent() {
final ActionManager actionManager = ActionManager.getInstance();
final ActionGroup actionGroup = (ActionGroup) actionManager.getAction(TOOL_WINDOW_TOOLBAR_ID);
ActionToolbar actionToolbar = actionManager.createActionToolbar(myPlace, actionGroup, true);
JPanel toolbarControl = new JPanel(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridwidth = GridBagConstraints.REMAINDER;
constraints.weightx = 1;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.anchor = GridBagConstraints.WEST;
toolbarControl.add(actionToolbar.getComponent(), constraints);
for (JComponent component : getToolbarControls()) {
component.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));
toolbarControl.add(component, constraints);
}
setToolbar(toolbarControl);
final JComponent payloadControl = buildContent();
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(payloadControl);
JScrollBar scrollBar = scrollPane.getVerticalScrollBar();
myContent.add(scrollPane, CONTENT_CARD_NAME);
RichTextControlBuilder builder = new RichTextControlBuilder();
builder.setBackgroundColor(payloadControl.getBackground());
builder.setForegroundColor(UIUtil.getInactiveTextColor());
builder.setFont(payloadControl.getFont());
builder.setText(GradleBundle.message("gradle.toolwindow.text.no.linked.project"));
final JComponent noLinkedProjectControl = builder.build();
myContent.add(noLinkedProjectControl, NON_LINKED_CARD_NAME);
update();
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project evosuite by EvoSuite.
the class ProjectRegistration method projectOpened.
@Override
public void projectOpened() {
EvoParameters.getInstance().load(project);
ActionManager am = ActionManager.getInstance();
// create the tool window, which will appear in the bottom when an EvoSuite run is started
ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
ToolWindow toolWindow = toolWindowManager.registerToolWindow("EvoSuite", false, ToolWindowAnchor.BOTTOM);
toolWindow.setTitle("EvoSuite Console Output");
toolWindow.setType(ToolWindowType.DOCKED, null);
// create a console panel
console = (ConsoleViewImpl) TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
JComponent consolePanel = console.getComponent();
IntelliJNotifier notifier = IntelliJNotifier.registerNotifier(project, "EvoSuite Plugin", console);
// create left-toolbar with stop button
DefaultActionGroup buttonGroup = new DefaultActionGroup();
buttonGroup.add(new StopEvoAction(notifier));
ActionToolbar viewToolbar = am.createActionToolbar("EvoSuite.ConsoleToolbar", buttonGroup, false);
JComponent toolBarPanel = viewToolbar.getComponent();
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(toolBarPanel, BorderLayout.WEST);
panel.add(consolePanel, BorderLayout.CENTER);
// Content content = contentFactory.createContent(consolePanel, "", false);
Content content = contentFactory.createContent(panel, "", false);
toolWindow.getContentManager().addContent(content);
}
use of com.intellij.openapi.actionSystem.ActionToolbar in project intellij by bazelbuild.
the class BlazeProblemsViewPanel method createToolbarPanel.
/**
* A custom toolbar panel, without most of the irrelevant built-in items.
*/
private JComponent createToolbarPanel() {
DefaultActionGroup group = new DefaultActionGroup();
// NOTYPO
group.add(new PreviousOccurenceToolbarAction(this));
// NOTYPO
group.add(new NextOccurenceToolbarAction(this));
fillRightToolbarGroup(group);
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.COMPILER_MESSAGES_TOOLBAR, group, false);
return toolbar.getComponent();
}
Aggregations