Add marker to code line

I have developed a plugin to find errors on source code. i want to add marker bar to the line which contains error. like analysis status. any one knows how do it.

0
4 comments

Could you please elaborate what do you mean by a marker bar?

0
Avatar
Permanently deleted user

There is a marker bar in right side of the editor. I want to add marker on that. for given code line.

in above image markers shown in yellow color. i want to add my makers as well

0

OK, I see. You need to create a highlighter to do that:

editor.getMarkupModel().addRangeHighlighter(...) or editor.getMarkupModel().addLineHighlighter(...)

The highlighter should either be created with TextAttributes for which error stripe color is set, or you can set error stripe color directly on created highlighter:

highlighter.setErrorStripeMarkColor(color)

 

0
Avatar
Permanently deleted user

Its working. Thank you.

0

Please sign in to leave a comment.