How to get COLORED text for the PSI element

I want to display colored source of a Java method, and I need to produce HTML like below for this:

for (
]]>


I can use a JavaResursiveVisitor and EditorColorsManager for this, but its better to use some helper method that does this :)

Is there some helper method to get HTML (that represents colored Java source) by PsiElement?

0
1 comment

Hello Alexei,

No, there is no public API in IDEA for this.

I want to display colored source of a Java method, and I need to
produce HTML like below for this:

 x = 1;
> for (
> ]]>

I can use a JavaResursiveVisitor and EditorColorsManager for this, but
its better to use some helper method that does this :)

Is there some helper method to get HTML (that represents colored Java
source) by PsiElement?

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.