Search in sources :

Example 1 with StartMarkAction

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);
    }
}
Also used : StartMarkAction(com.intellij.openapi.command.impl.StartMarkAction) RelativePoint(com.intellij.ui.awt.RelativePoint)

Aggregations

StartMarkAction (com.intellij.openapi.command.impl.StartMarkAction)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1