use of org.jetbrains.plugins.groovy.refactoring.extract.InitialInfo in project intellij-community by JetBrains.
the class GroovyExtractMethodHandler method invokeImpl.
private void invokeImpl(Project project, Editor editor, PsiFile file, final int startOffset, final int endOffset) {
try {
final InitialInfo initialInfo = GroovyExtractChooser.invoke(project, editor, file, startOffset, endOffset, true);
if (findConflicts(initialInfo))
return;
performRefactoring(initialInfo, editor);
} catch (GrRefactoringError e) {
CommonRefactoringUtil.showErrorHint(project, editor, e.getMessage(), REFACTORING_NAME, HelpID.EXTRACT_METHOD);
}
}
use of org.jetbrains.plugins.groovy.refactoring.extract.InitialInfo in project intellij-community by JetBrains.
the class GrIntroduceParameterHandler method invoke.
private void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file, int startOffset, int endOffset) {
try {
final InitialInfo initialInfo = GroovyExtractChooser.invoke(project, editor, file, startOffset, endOffset, false);
chooseScopeAndRun(initialInfo, editor);
} catch (GrRefactoringError e) {
if (ApplicationManager.getApplication().isUnitTestMode())
throw e;
CommonRefactoringUtil.showErrorHint(project, editor, e.getMessage(), RefactoringBundle.message("introduce.parameter.title"), HelpID.GROOVY_INTRODUCE_PARAMETER);
}
}
Aggregations