Action (@NotNull final MergeResult result) { if (result != MergeResult.CANCEL) return null; String caption = MergeUtil.getResolveActionTitle(result, null, myMergeContext); return new AbstractAction(caption) { @Override public void actionPerformed(ActionEvent e) { myMergeContext.finishMerge(result); } }; }