本文整理汇总了Java中com.intellij.ui.content.Content.setCloseable方法的典型用法代码示例。如果您正苦于以下问题:Java Content.setCloseable方法的具体用法?Java Content.setCloseable怎么用?Java Content.setCloseable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.content.Content
的用法示例。
在下文中一共展示了Content.setCloseable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTerminalInContentPanel
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
/**
* Create a terminal panel
*
* @param terminalRunner
* @param toolWindow
* @return
*/
private Content createTerminalInContentPanel(@NotNull AbstractTerminalRunner terminalRunner, @NotNull final ToolWindow toolWindow) {
SimpleToolWindowPanel panel = new SimpleToolWindowPanel(true);
Content content = ContentFactory.SERVICE.getInstance().createContent(panel, "", false);
content.setCloseable(true);
myTerminalWidget = terminalRunner.createTerminalWidget(content);
panel.setContent(myTerminalWidget.getComponent());
panel.addFocusListener(this);
createToolbar(terminalRunner, myTerminalWidget, toolWindow, panel);// west toolbar
ActionToolbar toolbar = createTopToolbar(terminalRunner, myTerminalWidget, toolWindow);
toolbar.setTargetComponent(panel);
panel.setToolbar(toolbar.getComponent(), false);
content.setPreferredFocusableComponent(myTerminalWidget.getComponent());
return content;
}
示例2: initEduConsole
import com.intellij.ui.content.Content; //导入方法依赖的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: initToolWindow
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
protected void initToolWindow() {
myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(UIDesignerBundle.message("toolwindow.ui.designer.name"),
false, getAnchor(), myProject, true);
myToolWindow.setIcon(UIDesignerIcons.ToolWindowUIDesigner);
if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
}
initGearActions();
ContentManager contentManager = myToolWindow.getContentManager();
Content content =
contentManager.getFactory()
.createContent(myToolWindowPanel.getToolWindowPanel(), UIDesignerBundle.message("toolwindow.ui.designer.title"), false);
content.setCloseable(false);
content.setPreferredFocusableComponent(myToolWindowPanel.getComponentTree());
contentManager.addContent(content);
contentManager.setSelectedContent(content, true);
myToolWindow.setAvailable(false, null);
}
示例4: initToolWindow
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
protected void initToolWindow() {
myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(DesignerBundle.message("designer.toolwindow.name"),
false, getAnchor(), myProject, true);
myToolWindow.setIcon(UIDesignerNewIcons.ToolWindow);
if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
}
((ToolWindowEx)myToolWindow).setTitleActions(myToolWindowContent.createActions());
initGearActions();
ContentManager contentManager = myToolWindow.getContentManager();
Content content =
contentManager.getFactory()
.createContent(myToolWindowContent.getToolWindowPanel(), DesignerBundle.message("designer.toolwindow.title"), false);
content.setCloseable(false);
content.setPreferredFocusableComponent(myToolWindowContent.getComponentTree());
contentManager.addContent(content);
contentManager.setSelectedContent(content, true);
myToolWindow.setAvailable(false, null);
}
示例5: createToolWindowContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
final DateTimeConverterView view = project.getComponent(DateTimeConverterView.class);
view.getModel().addRow(DateTimeUtil.nowGasDay());
final Content content = ContentFactory.SERVICE.getInstance().createContent(view.getComponent(), "", false);
content.setCloseable(true);
toolWindow.getContentManager().addContent(content);
}
示例6: addContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private void addContent(ContentManager contentManager, boolean supported) {
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content issuesContent = contentFactory.createContent(createIssuesViewTab(supported), "Issues", false);
Content licenseContent = contentFactory.createContent(createLicenseInfoTab(supported), "Licenses Info", false);
issuesContent.setCloseable(false);
licenseContent.setCloseable(false);
populateTrees();
contentManager.addContent(issuesContent);
contentManager.addContent(licenseContent);
}
示例7: initToolWindow
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
protected void initToolWindow() {
toolWindow = ToolWindowManager.getInstance(myProject)
.registerToolWindow("BPMN Palette", false, ToolWindowAnchor.RIGHT, myProject, true);
toolWindow.setIcon(AllIcons.Toolwindows.ToolWindowPalette);
ContentManager contentManager = toolWindow.getContentManager();
Content content = contentManager.getFactory().createContent(palette, null, false);
content.setCloseable(false);
content.setPreferredFocusableComponent(palette);
contentManager.addContent(content);
contentManager.setSelectedContent(content, true);
toolWindow.setAvailable(false, null);
}
示例8: createToolWindowContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
final ToolWindowPanel toolWindowPanel = new ToolWindowPanel(project);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(toolWindowPanel, project.getName(), false);
content.setIcon(Icons.LIVINGDOC);
content.putUserData(ToolWindow.SHOW_CONTENT_ICON, Boolean.TRUE);
content.setCloseable(true);
toolWindow.getContentManager().addContent(content);
}
示例9: createTerminalInContentPanel
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
/**
* 创建Terminal panel
*
* @param terminalRunner
* @param toolWindow
* @return
*/
private Content createTerminalInContentPanel(@NotNull AbstractTerminalRunner terminalRunner, @NotNull final ToolWindow toolWindow) {
SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true);
Content content = ContentFactory.SERVICE.getInstance().createContent(panel, "", false);
content.setCloseable(true);
myTerminalWidget = terminalRunner.createTerminalWidget(content);
panel.setContent(myTerminalWidget.getComponent());
panel.addFocusListener(this);
ActionToolbar toolbar = createToolbar(terminalRunner, myTerminalWidget, toolWindow);
toolbar.setTargetComponent(panel);
panel.setToolbar(toolbar.getComponent());
content.setPreferredFocusableComponent(myTerminalWidget.getComponent());
return content;
}
示例10: createToolWindowContent
import com.intellij.ui.content.Content; //导入方法依赖的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);
}
示例11: addThreadDump
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
public static void addThreadDump(Project project, List<ThreadState> threads, final RunnerLayoutUi ui, DebuggerSession session) {
final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
consoleBuilder.filters(ExceptionFilters.getFilters(session.getSearchScope()));
final ConsoleView consoleView = consoleBuilder.getConsole();
final DefaultActionGroup toolbarActions = new DefaultActionGroup();
consoleView.allowHeavyFilters();
final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);
final String id = THREAD_DUMP_CONTENT_PREFIX + " #" + myCurrentThreadDumpId;
final Content content = ui.createContent(id, panel, id, null, null);
content.putUserData(RunnerContentUi.LIGHTWEIGHT_CONTENT_MARKER, Boolean.TRUE);
content.setCloseable(true);
content.setDescription("Thread Dump");
ui.addContent(content);
ui.selectAndFocus(content, true, true);
myThreadDumpsCount++;
myCurrentThreadDumpId++;
Disposer.register(content, new Disposable() {
@Override
public void dispose() {
myThreadDumpsCount--;
if (myThreadDumpsCount == 0) {
myCurrentThreadDumpId = 1;
}
}
});
Disposer.register(content, consoleView);
ui.selectAndFocus(content, true, false);
if (threads.size() > 0) {
panel.selectStackFrame(0);
}
}
示例12: registerConsoleContent
import com.intellij.ui.content.Content; //导入方法依赖的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;
}
示例13: createVariablesContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private Content createVariablesContent(@NotNull XDebugSessionImpl session) {
final XVariablesView variablesView = new XVariablesView(session);
myViews.add(variablesView);
Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
XDebuggerBundle.message("debugger.session.tab.variables.title"),
AllIcons.Debugger.Value, null);
result.setCloseable(false);
ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
return result;
}
示例14: createWatchesContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private Content createWatchesContent(@NotNull XDebugSessionImpl session) {
myWatchesView = new XWatchesViewImpl(session);
myViews.add(myWatchesView);
Content watchesContent = myUi.createContent(DebuggerContentInfo.WATCHES_CONTENT, myWatchesView.getMainPanel(),
XDebuggerBundle.message("debugger.session.tab.watches.title"), AllIcons.Debugger.Watches, null);
watchesContent.setCloseable(false);
return watchesContent;
}
示例15: createFramesContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@NotNull
private Content createFramesContent() {
XFramesView framesView = new XFramesView(myProject);
myViews.add(framesView);
Content framesContent = myUi.createContent(DebuggerContentInfo.FRAME_CONTENT, framesView.getMainPanel(),
XDebuggerBundle.message("debugger.session.tab.frames.title"), AllIcons.Debugger.Frame, null);
framesContent.setCloseable(false);
return framesContent;
}