use of com.intellij.openapi.command.impl.StartMarkAction in project intellij-community by JetBrains.
the class InplaceRefactoring method unableToStartWarning.
public static void unableToStartWarning(Project project, Editor editor) {
final StartMarkAction startMarkAction = StartMarkAction.canStart(project);
final String message = startMarkAction.getCommandName() + " is not finished yet.";
final Document oldDocument = startMarkAction.getDocument();
if (editor == null || oldDocument != editor.getDocument()) {
final int exitCode = Messages.showYesNoDialog(project, message, RefactoringBundle.getCannotRefactorMessage(null), "Continue Started", "Cancel Started", Messages.getErrorIcon());
navigateToStarted(oldDocument, project, exitCode);
} else {
CommonRefactoringUtil.showErrorHint(project, editor, message, RefactoringBundle.getCannotRefactorMessage(null), null);
}
}
Aggregations