Get IntelliJ Exception Highlighting and Linking to Source?

I have my own log viewer plugin. It has it's own special colour highlighting based on log level etc. I'd like to add the ability to get the link to source when exceptions are logged. I know the intellij output window has that capability as well as the ant output window.

How can I add this linking to source in my own window?

3 comments

Hello Mike,

MW> I have my own log viewer plugin. It has it's own special colour
MW> highlighting based on log level etc. I'd like to add the ability to
MW> get the link to source when exceptions are logged. I know the
MW> intellij output window has that capability as well as the ant output
MW> window.
MW>
MW> How can I add this linking to source in my own window?

You can either replace your own window with a console window returned by
TextConsoleBuilderFactory.getInstance().createBuilder().getConsole(), or
implement this by yourself in any way you'd like to.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

i donot know if there is an openapi for parsing the Exception dump but it is very trivial to implement as a regular expression (u may use java regexp or apache oro which is included with idea) to get the filename and line number
with this info in hand
1- construct virtualFile
2-pass it to FileDocumentManager.getDocument to get a Document instance
3-pass the document to EditorFactory.createEditor to get Editor instance
4-get the caretModel and use it to go to the line number
good luck
joe

0

i donot know if there is an openapi for parsing the Exception dump but it is very trivial to implement as a regular expression (u may use java regexp or apache oro which is included with idea) to get the filename and line number
with this info in hand
1- construct virtualFile
2-pass it to FileDocumentManager.getDocument to get a Document instance
3-pass the document to EditorFactory.createEditor to get Editor instance
4-get the caretModel and use it to go to the line number
good luck
joe

0

Please sign in to leave a comment.