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