How to show special character like "<" with HintManager.getInstance().showInformationHint ?

Answered

I am developing a plugin, which will show some special characters like "<、>"。When I use HintManager.getInstance().showInformationHint to show them, they won't be displayed.

I have checked the showInformationHint  source code, it use a JLabel to show string content, and will convert string to html data. So I think some mistakes happened when string to html.

So, anybody know the reason? what should I do to let these chars be displayed ?

0
1 comment

You need to escape the <, >, and & characters (e.g. `this &amp; that`) as <...> will be interpreted as a HTML tag (e.g. `<p>Test</p>`).

0

Please sign in to leave a comment.