DefaultActionGroup (@NotNull JComponent button, @NotNull DataContext context) { DiffContext diffContext = context.getData(DiffDataKeys.DIFF_CONTEXT); DiffRequest diffRequest = context.getData(DiffDataKeys.DIFF_REQUEST); if (diffContext == null || diffRequest == null) return new DefaultActionGroup(); DefaultActionGroup group = new DefaultActionGroup(); for (DiffTool tool : filterFittedTools(getAllKnownTools(), diffContext, diffRequest)) { group.add(new DiffToolToggleAction(tool)); } return group; }