本文整理汇总了Java中com.intellij.execution.ui.layout.PlaceInGrid类的典型用法代码示例。如果您正苦于以下问题:Java PlaceInGrid类的具体用法?Java PlaceInGrid怎么用?Java PlaceInGrid使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlaceInGrid类属于com.intellij.execution.ui.layout包,在下文中一共展示了PlaceInGrid类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setDetached
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
@Override
public void setDetached(PlaceInGrid place, boolean detached) {
switch (place) {
case bottom:
setBottomDetached(detached);
break;
case center:
setCenterDetached(detached);
break;
case left:
setLeftDetached(detached);
break;
case right:
setRightDetached(detached);
break;
}
}
示例2: initEduConsole
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
private static void initEduConsole(@NotNull final XDebugSession session,
@NotNull final RunnerLayoutUi ui) {
Project project = session.getProject();
final Sdk sdk = PythonSdkType.findPythonSdk(ModuleManager.getInstance(project).getModules()[0]);
final PythonDebugLanguageConsoleView view = new PythonDebugLanguageConsoleView(project, sdk);
final ProcessHandler processHandler = session.getDebugProcess().getProcessHandler();
view.attachToProcess(processHandler);
view.addMessageFilter(new PythonTracebackFilter(project));
view.addMessageFilter(new UrlFilter());
view.enableConsole(false);
Content eduConsole =
ui.createContent("EduConsole", view.getComponent(),
XDebuggerBundle.message("debugger.session.tab.console.content.name"),
AllIcons.Debugger.ToolConsole, view.getPreferredFocusableComponent());
eduConsole.setCloseable(false);
ui.addContent(eduConsole, 0, PlaceInGrid.right, false);
PyDebugProcess process = (PyDebugProcess)session.getDebugProcess();
PyDebugRunner.initDebugConsoleView(project, process, view, processHandler, session);
patchLeftToolbar(session, ui);
}
示例3: createToolWindowContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的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);
}
示例4: setUpToolWindow
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的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;
}
示例5: createToolWindowContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的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);
}
示例6: createToolWindowContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
@Override
public void createToolWindowContent(
@NotNull final Project project, @NotNull ToolWindow toolWindow) {
toolWindow.setAvailable(true, null);
toolWindow.setToHideOnEmptyContent(true);
RunnerLayoutUi runnerLayoutUi = BuckUIManager.getInstance(project).getLayoutUi(project);
Content consoleContent = createConsoleContent(runnerLayoutUi, project);
runnerLayoutUi.addContent(consoleContent, 0, PlaceInGrid.center, false);
runnerLayoutUi.getOptions().setLeftToolbar(
getLeftToolbarActions(project), ActionPlaces.UNKNOWN);
runnerLayoutUi.updateActionsNow();
final ContentManager contentManager = toolWindow.getContentManager();
Content content = contentManager.getFactory().createContent(
runnerLayoutUi.getComponent(), "", true);
contentManager.addContent(content);
updateBuckToolWindowTitle(project);
}
示例7: XDebugSessionTab
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
private XDebugSessionTab(@Nonnull XDebugSessionImpl session, @Nullable Icon icon, @Nullable ExecutionEnvironment environment) {
super(session.getProject(), "Debug", session.getSessionName(), GlobalSearchScope.allScope(session.getProject()));
setSession(session, environment, icon);
myUi.addContent(createFramesContent(), 0, PlaceInGrid.left, false);
addVariablesAndWatches(session);
attachToSession(session);
DefaultActionGroup focus = new DefaultActionGroup();
focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_BREAKPOINT));
myUi.getOptions().setAdditionalFocusActions(focus);
myUi.addListener(new ContentManagerAdapter() {
@Override
public void selectionChanged(ContentManagerEvent event) {
Content content = event.getContent();
if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) {
myRebuildWatchesRunnable.run();
}
}
}, myRunContentDescriptor);
rebuildViews();
}
示例8: registerConsoleContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
/**
* Registers tab for the given {@code console}.
*
* @param console {@code ExecutionConsole} instance
* @param ui {@code RunnerLayoutUi} instance
* @return registered {@code Content} instance
*/
@NotNull
public Content registerConsoleContent(@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) {
Content content = ui.createContent(DebuggerContentInfo.CONSOLE_CONTENT, console.getComponent(),
XDebuggerBundle.message("debugger.session.tab.console.content.name"),
AllIcons.Debugger.Console,
console.getPreferredFocusableComponent());
content.setCloseable(false);
ui.addContent(content, 1, PlaceInGrid.bottom, false);
return content;
}
示例9: getOrCreateDefault
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
@NotNull
private ViewImpl.Default getOrCreateDefault(@NotNull String id) {
if (myDefaultViews.containsKey(id)) {
return myDefaultViews.get(id);
}
return setDefault(id, Integer.MAX_VALUE, PlaceInGrid.bottom, false);
}
示例10: ViewImpl
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
public ViewImpl(String id, TabImpl tab, final PlaceInGrid placeInGrid, boolean minimizedInGrid, int window) {
myID = id;
myTab = tab;
myPlaceInGrid = placeInGrid;
myMinimizedInGrid = minimizedInGrid;
myWindow = window;
}
示例11: addContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
public Content addContent(@NotNull Content content, boolean applyDefaults, int defaultTabId, @NotNull PlaceInGrid defaultPlace, boolean defaultIsMinimized) {
final String id = content.getUserData(CONTENT_TYPE);
assert id != null : "Content id is missing, use RunnerLayoutUi to create content instances";
if (applyDefaults) {
getLayout().setDefault(id, defaultTabId, defaultPlace, defaultIsMinimized);
}
getContentManager().addContent(content);
return content;
}
示例12: isDetached
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
@Override
public boolean isDetached(PlaceInGrid place) {
switch (place) {
case bottom:
return isBottomDetached();
case center:
return isCenterDetached();
case left:
return isLeftDetached();
case right:
return isRightDetached();
}
return false;
}
示例13: buildConsoleUiDefault
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
public static void buildConsoleUiDefault(RunnerLayoutUi ui, final ExecutionConsole console) {
final Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID, console.getComponent(), "Console",
AllIcons.Debugger.Console,
console.getPreferredFocusableComponent());
consoleContent.setCloseable(false);
addAdditionalConsoleEditorActions(console, consoleContent);
ui.addContent(consoleContent, 0, PlaceInGrid.bottom, false);
}
示例14: createToolWindowContent
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的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);
}
示例15: buildConsoleUiDefault
import com.intellij.execution.ui.layout.PlaceInGrid; //导入依赖的package包/类
public static void buildConsoleUiDefault(RunnerLayoutUi ui, final ExecutionConsole console) {
final Content consoleContent = ui.createContent(ExecutionConsole.CONSOLE_CONTENT_ID, console.getComponent(), "Console",
AllIcons.Debugger.Console,
console.getPreferredFocusableComponent());
consoleContent.setCloseable(false);
addAdditionalConsoleEditorActions(console, consoleContent);
ui.addContent(consoleContent, 0, PlaceInGrid.bottom, false);
}