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


Java ConsoleView.allowHeavyFilters方法代码示例

本文整理汇总了Java中com.intellij.execution.ui.ConsoleView.allowHeavyFilters方法的典型用法代码示例。如果您正苦于以下问题:Java ConsoleView.allowHeavyFilters方法的具体用法?Java ConsoleView.allowHeavyFilters怎么用?Java ConsoleView.allowHeavyFilters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.ui.ConsoleView的用法示例。


在下文中一共展示了ConsoleView.allowHeavyFilters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addThreadDump

import com.intellij.execution.ui.ConsoleView; //导入方法依赖的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

示例2: addConsole

import com.intellij.execution.ui.ConsoleView; //导入方法依赖的package包/类
public static RunContentDescriptor addConsole(Project project,
                                              @Nullable ConsoleFactory consoleFactory,
                                              final String tabTitle,
                                              String text,
                                              @Nullable Icon icon) {
  final TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
  builder.filters(Extensions.getExtensions(EP_NAME, project));
  final ConsoleView consoleView = builder.getConsole();

  final DefaultActionGroup toolbarActions = new DefaultActionGroup();
  JComponent consoleComponent = consoleFactory != null
                                ? consoleFactory.createConsoleComponent(consoleView, toolbarActions)
                                : new MyConsolePanel(consoleView, toolbarActions);
  final RunContentDescriptor descriptor =
    new RunContentDescriptor(consoleView, null, consoleComponent, tabTitle, icon) {
    @Override
    public boolean isContentReuseProhibited() {
      return true;
    }
  };

  final Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  for (AnAction action: consoleView.createConsoleActions()) {
    toolbarActions.add(action);
  }
  final ConsoleViewImpl console = (ConsoleViewImpl)consoleView;
  console.getEditor().getSettings().setCaretRowShown(true);
  toolbarActions.add(new AnnotateStackTraceAction(console.getEditor(), console.getHyperlinks()));
  toolbarActions.add(new CloseAction(executor, descriptor, project));
  ExecutionManager.getInstance(project).getContentManager().showRunContent(executor, descriptor);
  consoleView.allowHeavyFilters();
  if (consoleFactory == null) {
    printStacktrace(consoleView, text);
  }
  return descriptor;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:AnalyzeStacktraceUtil.java


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