mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AIOOBE (IDEA-174007)
This commit is contained in:
+5
@@ -57,6 +57,11 @@ public class IntroduceFunctionalVariableHandler extends IntroduceVariableHandler
|
||||
ExtractMethodHandler.selectAndPass(project, editor, file, new Pass<PsiElement[]>() {
|
||||
@Override
|
||||
public void pass(PsiElement[] elements) {
|
||||
if (elements.length == 0) {
|
||||
String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("selected.block.should.represent.a.set.of.statements.or.an.expression"));
|
||||
showErrorMessage(project , editor, message);
|
||||
return;
|
||||
}
|
||||
PsiElement anchorStatement = RefactoringUtil.getParentStatement(elements[0], false);
|
||||
PsiElement tempContainer = checkAnchorStatement(project, editor, anchorStatement);
|
||||
if (tempContainer == null) return;
|
||||
|
||||
Reference in New Issue
Block a user