mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
method ref: conflict when change signature of method used in method ref (IDEA-92601)
This commit is contained in:
+4
-1
@@ -885,8 +885,9 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr
|
||||
}
|
||||
|
||||
for (UsageInfo usageInfo : usagesSet) {
|
||||
final PsiElement element = usageInfo.getElement();
|
||||
if (usageInfo instanceof OverriderUsageInfo) {
|
||||
final PsiMethod method = (PsiMethod)usageInfo.getElement();
|
||||
final PsiMethod method = (PsiMethod)element;
|
||||
final PsiMethod baseMethod = ((OverriderUsageInfo)usageInfo).getBaseMethod();
|
||||
final int delta = baseMethod.getParameterList().getParametersCount() - method.getParameterList().getParametersCount();
|
||||
if (delta > 0) {
|
||||
@@ -895,6 +896,8 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr
|
||||
conflictDescriptions.putValue(baseMethod, "Implicit last parameter should not be deleted");
|
||||
}
|
||||
}
|
||||
} else if (element instanceof PsiMethodReferenceExpression) {
|
||||
conflictDescriptions.putValue(element, "Changed method is used in method reference");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -266,6 +266,9 @@ class JavaChangeSignatureUsageSearcher {
|
||||
else if (element instanceof XmlElement) {
|
||||
result.add(new MoveRenameUsageInfo(reference, method));
|
||||
}
|
||||
else if (element instanceof PsiMethodReferenceExpression) {
|
||||
result.add(new UsageInfo(reference));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user