Custom code coverage line

Hi. Is it possible to create custom code coverage line from plugin?

Painted prototype. I imagine something like this:

1. the existing code coverage line

2. I want to create this line from my plugin.

Is it possible? If yes, how can i create this line from plugin?


1 comment
Comment actions Permalink


AFAIK plugin can't reserve space in a gutter. So, custom line will have to conflict with some other area of the gutter (just like coverage line did in previous versions - by painting behind line numbers

To show your own line, you can create RangeHighlighter and set LineMarkerRenderer on it. It can implement ActiveGutterRenderer to handle mouse clicks. Note, that you can draw outside of the area of passed Rectangle.

By default, it paints in a VCS-changed-lines area. It can override LineMarkerRendererEx.getPosition() to be painted in a code coverage area.

As an alternative, you can use API, that is used by VCS annotations (git blame) - EditorGutter.registerTextAnnotation and EditorGutter.closeAllAnnotations. But they will conflict with vcs annotations.


Please sign in to leave a comment.