List<LocalTrackerChange> (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); Side side = Side.fromValue(myViewer.getEditors(), editor); if (side == null) return null; return StreamEx.of(myViewer.getSelectedChanges(side)) .select(MySimpleDiffChange.class) .map(it -> new LocalTrackerChange(it.getStartLine(Side.RIGHT), it.getEndLine(Side.RIGHT), it.getChangelistId(), it.getExclusionState())) .toList(); }