void (final Project project, final Editor editor, final @Nullable StartMarkAction startAction) { if (startAction == null) return; CommandProcessor.getInstance().executeCommand(project, () -> { DocumentReference reference = DocumentReferenceManager.getInstance().create(editor.getDocument()); UndoManager.getInstance(project).undoableActionPerformed(new FinishMarkAction(reference, startAction)); StartMarkAction.markFinished(editor); }, IdeBundle.message("command.finish"), null); }