void (int editorLine) { List<UnifiedDiffChange> changes = getDiffChanges(); if (changes == null) { destroyHoverHighlighter(); return; } MyUnifiedDiffChange change = ObjectUtils.tryCast(ContainerUtil.find(changes, it -> it.getLine1() <= editorLine && it.getLine2() > editorLine), MyUnifiedDiffChange.class); if (change == null || change.isPartiallyExcluded() || !myLocalRequest.getChangelistId().equals(change.getChangelistId())) { destroyHoverHighlighter(); return; } int rightLine = transferLineFromOnesideStrict(Side.RIGHT, editorLine); int leftLine = transferLineFromOnesideStrict(Side.LEFT, editorLine); int line; Side side; if (rightLine != -1) { line = rightLine; side = Side.RIGHT; } else if (leftLine != -1) { line = leftLine; side = Side.LEFT; } else { destroyHoverHighlighter(); return; } if (LocalTrackerDiffUtil.hasIconHighlighters(myProject, myEditor, editorLine)) { if (myHighlighter != null && myEditor.getDocument().getLineNumber(myHighlighter.getStartOffset()) != editorLine) { destroyHoverHighlighter(); } return; } destroyHoverHighlighter(); boolean isExcludedFromCommit = change.getExclusionState() instanceof RangeExclusionState.Excluded; myHighlighter = LocalTrackerDiffUtil.createCheckboxToggle(myEditor, editorLine, isExcludedFromCommit, () -> { LocalTrackerDiffUtil.toggleLinePartialExclusion(myTrackerActionProvider, line, side, isExcludedFromCommit); destroyHoverHighlighter(); }); }