List<AnAction> (int logicalLine) { final List<AnAction> addActions = new ArrayList<>(); if (myCanCloseAnnotations) addActions.add(new CloseAnnotationsAction()); //if (line >= myEditor.getDocument().getLineCount()) return; for (TextAnnotationGutterProvider gutterProvider : myTextAnnotationGutters) { final List<AnAction> list = gutterProvider.getPopupActions(logicalLine, myEditor); if (list != null) { for (AnAction action : list) { if (!addActions.contains(action)) { addActions.add(action); } } } } return addActions; }