本文整理汇总了Java中com.intellij.execution.ui.RunnerLayoutUi.Factory方法的典型用法代码示例。如果您正苦于以下问题:Java RunnerLayoutUi.Factory方法的具体用法?Java RunnerLayoutUi.Factory怎么用?Java RunnerLayoutUi.Factory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.execution.ui.RunnerLayoutUi
的用法示例。
在下文中一共展示了RunnerLayoutUi.Factory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createToolWindowContent
import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
public void createToolWindowContent(@NotNull ToolWindow toolWindow) {
//Create runner UI layout
RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(myProject);
RunnerLayoutUi layoutUi = factory.create("", "", "session", myProject);
// Adding actions
DefaultActionGroup group = new DefaultActionGroup();
layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
Content console = layoutUi.createContent(GradleConsoleToolWindowFactory.ID, myConsoleView.getComponent(), "", null, null);
AnAction[] consoleActions = myConsoleView.createConsoleActions();
for (AnAction action : consoleActions) {
if (!shouldIgnoreAction(action)) {
group.add(action);
}
}
layoutUi.addContent(console, 0, PlaceInGrid.right, false);
JComponent layoutComponent = layoutUi.getComponent();
myConsolePanel.add(layoutComponent, BorderLayout.CENTER);
//noinspection ConstantConditions
Content content = ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
toolWindow.getContentManager().addContent(content);
}
示例2: setUpToolWindow
import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
private Content setUpToolWindow() {
//Create runner UI layout
final RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(myProject);
final RunnerLayoutUi layoutUi = factory.create("", "", "session", myProject);
// Adding actions
DefaultActionGroup group = new DefaultActionGroup();
group.add(myKillAction);
group.addSeparator();
layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
final Content console = layoutUi.createContent(CONSOLE_ID, myConsole.getComponent(), "", null, null);
layoutUi.addContent(console, 0, PlaceInGrid.right, false);
final JComponent uiComponent = layoutUi.getComponent();
myPanel.add(uiComponent, BorderLayout.CENTER);
final ContentManager manager = myToolWindow.getContentManager();
final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
final Content content = contentFactory.createContent(uiComponent, null, true);
manager.addContent(content);
return content;
}
示例3: createToolWindowContent
import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
/**
* Creats the tool window content
* @param toolWindow
*/
public void createToolWindowContent(@NotNull ToolWindow toolWindow) {
//Create runner UI layout
RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(project);
RunnerLayoutUi layoutUi = factory.create("", "", "session", project);
// Adding actions
DefaultActionGroup group = new DefaultActionGroup();
layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
Content console = layoutUi.createContent(EmbeddedLinuxJVMToolWindowFactory.ID, consoleView.getComponent(), "", null, null);
AnAction[] consoleActions = consoleView.createConsoleActions();
for (AnAction action : consoleActions) {
if (!shouldIgnoreAction(action)) {
group.add(action);
}
}
layoutUi.addContent(console, 0, PlaceInGrid.right, false);
JComponent layoutComponent = layoutUi.getComponent();
myConsolePanel.add(layoutComponent, BorderLayout.CENTER);
Content content = ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
toolWindow.getContentManager().addContent(content);
}
示例4: createToolWindowContent
import com.intellij.execution.ui.RunnerLayoutUi; //导入方法依赖的package包/类
public void createToolWindowContent(ToolWindow toolWindow) {
// Create runner UI layout
RunnerLayoutUi.Factory factory = RunnerLayoutUi.Factory.getInstance(project);
RunnerLayoutUi layoutUi = factory.create("", "", "session", project);
Content console =
layoutUi.createContent(
BlazeConsoleToolWindowFactory.ID, consoleView.getComponent(), "", null, null);
console.setCloseable(false);
layoutUi.addContent(console, 0, PlaceInGrid.right, false);
// Adding actions
DefaultActionGroup group = new DefaultActionGroup();
layoutUi.getOptions().setLeftToolbar(group, ActionPlaces.UNKNOWN);
AnAction[] consoleActions = consoleView.createConsoleActions();
for (AnAction action : consoleActions) {
if (!shouldIgnoreAction(action)) {
group.add(action);
}
}
group.add(new StopAction());
JComponent layoutComponent = layoutUi.getComponent();
//noinspection ConstantConditions
Content content =
ContentFactory.SERVICE.getInstance().createContent(layoutComponent, null, true);
content.setCloseable(false);
toolWindow.getContentManager().addContent(content);
}