当前位置: 首页>>代码示例>>Java>>正文


Java Content.setCloseable方法代码示例

本文整理汇总了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;
}
 
开发者ID:beansoftapp,项目名称:react-native-console,代码行数:25,代码来源:ReactNativeTerminal.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:PyEduDebugRunner.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:DesignerToolWindowManager.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:DesignerToolWindowManager.java

示例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);
}
 
开发者ID:imgruntw,项目名称:date-time-converter-plugin,代码行数:11,代码来源:DateTimeConverterWindowFactory.java

示例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);
}
 
开发者ID:JFrogDev,项目名称:jfrog-idea-plugin,代码行数:11,代码来源:XrayToolWindow.java

示例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);
}
 
开发者ID:Blenta,项目名称:intellij-bpmn-editor,代码行数:14,代码来源:BPMNPaletteToolWindowManager.java

示例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);
}
 
开发者ID:testIT-LivingDoc,项目名称:livingdoc-intellij,代码行数:13,代码来源:ToolWindowFactoryImpl.java

示例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;
}
 
开发者ID:typ0520,项目名称:fastdex,代码行数:21,代码来源:FastdexTerminal.java

示例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);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:32,代码来源:BlazeConsoleView.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:DebuggerUtilsEx.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:XDebugTabLayouter.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebugSessionTab.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XDebugSessionTab.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:XDebugSessionTab.java


注:本文中的com.intellij.ui.content.Content.setCloseable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。