Is there any API that will display a stack trace in a tool window that also allows the user to click the line numbers and open the source file in an editor?
Is there any API that will display a stack trace in a tool window that also allows the user to click the line numbers and open the source file in an editor?
Yes. You can create a console window with TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole() and output text to it using the print() method. The hyperlinking functionality will be supported automatically.
-- Dmitry Jemerov Development Lead JetBrains, Inc. http://www.jetbrains.com/ "Develop with Pleasure!"
Hello David,
Yes. You can create a console window with TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole()
and output text to it using the print() method. The hyperlinking functionality
will be supported automatically.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I added this code:
ConsoleView view = TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole();
view.print("error string", ConsoleViewContentType.ERROR_OUTPUT);
However, nothing ever displays.
Thank you,
David
Hello David,
Did you add the console to a toolwindow? This code snippet just creates a
console in memory, you won't see it anywhere.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"