本文整理汇总了Java中com.intellij.unscramble.ThreadDumpPanel类的典型用法代码示例。如果您正苦于以下问题:Java ThreadDumpPanel类的具体用法?Java ThreadDumpPanel怎么用?Java ThreadDumpPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ThreadDumpPanel类属于com.intellij.unscramble包,在下文中一共展示了ThreadDumpPanel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import com.intellij.unscramble.ThreadDumpPanel; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
if (project == null) {
return;
}
DebuggerContextImpl context = (DebuggerManagerEx.getInstanceEx(project)).getContext();
final DebuggerSession session = context.getDebuggerSession();
if(session != null && session.isAttached()) {
final DebugProcessImpl process = context.getDebugProcess();
if (process != null) {
process.getManagerThread().invoke(new DebuggerCommandImpl() {
protected void action() throws Exception {
final List<ThreadState> threads = ThreadDumpAction.buildThreadStates(process.getVirtualMachineProxy());
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
ExportToTextFileAction.export(project, ThreadDumpPanel.createToFileExporter(project, threads));
}
}, ModalityState.NON_MODAL);
}
});
}
}
}
示例2: addThreadDump
import com.intellij.unscramble.ThreadDumpPanel; //导入依赖的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);
}
}
示例3: addThreadDump
import com.intellij.unscramble.ThreadDumpPanel; //导入依赖的package包/类
public void addThreadDump(List<ThreadState> threads) {
final Project project = getProject();
final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
List<Filter> filters = ExceptionFilters.getFilters(myDebuggerSession.getSearchScope());
for (Filter filter : filters) {
consoleBuilder.addFilter(filter);
}
final ConsoleView consoleView = consoleBuilder.getConsole();
final DefaultActionGroup toolbarActions = new DefaultActionGroup();
consoleView.allowHeavyFilters();
final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);
final Icon icon = null;
final String id = createThreadDumpContentId();
final Content content = myUi.createContent(id, panel, id, icon, null);
content.setCloseable(true);
content.setDescription("Thread Dump");
myUi.addContent(content);
myUi.selectAndFocus(content, true, true);
myThreadDumpsCount += 1;
myCurrentThreadDumpId += 1;
Disposer.register(this, new Disposable() {
public void dispose() {
myUi.removeContent(content, true);
}
});
Disposer.register(content, new Disposable() {
public void dispose() {
myThreadDumpsCount -= 1;
if (myThreadDumpsCount == 0) {
myCurrentThreadDumpId = 1;
}
}
});
myUi.selectAndFocus(content, true, false);
if (threads.size() > 0) {
panel.selectStackFrame(0);
}
}
示例4: addThreadDump
import com.intellij.unscramble.ThreadDumpPanel; //导入依赖的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);
}
}