IOOBE: do not position caret in another editor

This commit is contained in:
anna
2011-12-20 15:41:33 +01:00
parent 6240eea3a7
commit 5d4b6480f3
@@ -120,7 +120,7 @@ public class AddMethodFix extends LocalQuickFixAndIntentionActionOnPsiElement {
}
PsiMethod method = (PsiMethod)myClass.add(myMethodPrototype);
method = (PsiMethod)method.replace(reformat(project, method));
if (editor != null) {
if (editor != null && method.getContainingFile() == file) {
GenerateMembersUtil.positionCaret(editor, method, true);
}
}