int (@NonNls DataContext dataContext, boolean approximate) { Editor editor = dataContext.getData(CommonDataKeys.EDITOR); if (editor == null) return LineNumberConstants.ABSENT_LINE_NUMBER; TextAnnotationPresentation annotationPresentation = AnnotateToggleAction.getAnnotationPresentation(editor); if (annotationPresentation == null) return LineNumberConstants.ABSENT_LINE_NUMBER; Integer gutterLine = dataContext.getData(EditorGutterComponentEx.LOGICAL_LINE_AT_CURSOR); int editorLine = gutterLine != null ? gutterLine : editor.getCaretModel().getLogicalPosition().line; return annotationPresentation.getAnnotationLine(editorLine, approximate); }