Link to file location from JTextPane

My plugin adds a toolwindow with a JTextPane in it.

How can i create links to file locations from the text in the JTextPane just like what you see in the messages toolwindow when for instance it shows an exception stacktrace.

Thanks

2 comments
Comment actions Permalink

Hello Hugo,

IDEA doesn't use JTextPanes for this purpose. You should probably use com.intellij.execution.filters.TextConsoleBuilderFactory to create a com.intellij.execution.ui.ConsoleView which has the possibility to output text and hyperlinks.

Sascha

0
Comment actions Permalink

Thanks, i'll give it a try

0

Please sign in to leave a comment.