Vertical linemarker in Editor

Hi,

I'm looking for a way to show a marker over multiple lines between the gutter (the column, where icons like e.g. breakpoints are shown) and the column where the plus and minus signs for collapsing loops and methods are.
A picture where the marker should be:
marked.png
The marker will be used to indicate problems with code. I know of the Annotator (http://confluence.jetbrains.com/display/IntelliJIDEA/Annotator), but I'm looking for a less distractive form.

Any suggestions on how to archieve this?

3 comments
Comment actions Permalink

It's possible to define custom line marker renderer for a RangeHighlighter. This feature is used by XML/HTML tag tree highlighting, visually it looks just like in your example. Check out how XmlTagTreeHighlightingPass is implemented.

1
Comment actions Permalink

Thank you for your help! I am using a LineMarkerRenderer in a TextEditorHighlightingPass to display the bar.

Now, I also need the ability to handle hover and click events on the bar, the same way the VCS Plugins (svn4idea and git4idea) do it near the gutter on the left side of the editor. Where can I find the code for that? I presume there is some common codebase for this feature...

1
Comment actions Permalink

You'll need to implement ActiveGutterRenderer to do that. You can take existing implementations as examples.

1

Please sign in to leave a comment.