List<FoldRegion> (@Nullable FoldRegion foldingAtCursor) { if (foldingAtCursor == null) { return Collections.emptyList(); } else { FoldingGroup group = foldingAtCursor.getGroup(); if (group == null) { return Collections.singletonList(foldingAtCursor); } return myEditor.getFoldingModel().getGroupedRegions(group); } }