allow single imports of methods with the same name (IDEA-89144)

This commit is contained in:
anna
2012-07-23 12:48:45 +02:00
parent ddccd5fb72
commit 5982b9f440
@@ -78,7 +78,12 @@ public class AddSingleMemberStaticImportAction extends PsiElementBaseIntentionAc
}
}
}
if (importList.findSingleImportStatement(refExpr.getReferenceName()) == null) {
final PsiImportStatementBase importStatement = importList.findSingleImportStatement(refExpr.getReferenceName());
if (importStatement == null) {
return qName;
}
final PsiElement resolve = importStatement.resolve();
if (resolve instanceof PsiMember && ((PsiMember)resolve).getContainingClass() != aClass) {
return qName;
}
}