use of com.intellij.openapi.vcs.ex.LineStatusMarkerRenderer in project intellij-community by JetBrains.
the class VcsPreviewPanel method addHighlighter.
private void addHighlighter(@NotNull Range range, @NotNull ColorKey colorKey) {
TextRange textRange = DiffUtil.getLinesRange(myEditor.getDocument(), range.getLine1(), range.getLine2());
RangeHighlighter highlighter = LineStatusMarkerRenderer.createRangeHighlighter(range, textRange, myEditor.getMarkupModel());
highlighter.setLineMarkerRenderer(new LineStatusMarkerRenderer(range) {
@Override
public boolean canDoAction(MouseEvent e) {
return isInsideMarkerArea(e);
}
@Override
public void doAction(Editor editor, MouseEvent e) {
myDispatcher.getMulticaster().selectionInPreviewChanged(colorKey.getExternalName());
}
});
}
Aggregations