mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not rename in the same name
This commit is contained in:
+1
-1
@@ -491,7 +491,7 @@ public class PsiReferenceExpressionImpl extends PsiReferenceExpressionBase imple
|
||||
throw new IncorrectOperationException();
|
||||
}
|
||||
final String oldRefName = oldIdentifier.getText();
|
||||
if (PsiKeyword.THIS.equals(oldRefName) || PsiKeyword.SUPER.equals(oldRefName)) return this;
|
||||
if (PsiKeyword.THIS.equals(oldRefName) || PsiKeyword.SUPER.equals(oldRefName) || Comparing.strEqual(oldRefName, newElementName)) return this;
|
||||
PsiIdentifier identifier = JavaPsiFacade.getInstance(getProject()).getElementFactory().createIdentifier(newElementName);
|
||||
oldIdentifier.replace(identifier);
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user