List<AnAction> () { List<AnAction> result = new ArrayList<>(); if (showScrollToFromSourceActions()) { result.add(myAutoScrollToSourceHandler.createToggleAction()); result.add(myAutoScrollFromSourceHandler.createToggleAction()); } return result; }