mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] MethodParameterInfoHandler: handle constructor completion when it's resolved to a class
Fixes CCE: MethodParameterInfoHandler.findElementForUpdatingParameterInfo GitOrigin-RevId: 78cc87045e240bbd54418c85edf354618a67a17f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
634f6fb5ca
commit
652fdc6960
+3
-3
@@ -151,11 +151,11 @@ public final class MethodParameterInfoHandler
|
||||
Object[] candidates = context.getObjectsToView();
|
||||
if (candidates != null && candidates.length != 0) {
|
||||
Object highlighted = context.getHighlightedParameter();
|
||||
CandidateWithPresentation currentMethodInfo;
|
||||
CandidateWithPresentation currentMethodInfo = null;
|
||||
if (highlighted instanceof PsiMethod method) {
|
||||
currentMethodInfo = (CandidateWithPresentation)ContainerUtil.find(candidates, c -> getMethodFromCandidate(c).equals(method));
|
||||
} else {
|
||||
currentMethodInfo = (CandidateWithPresentation)highlighted;
|
||||
} else if (highlighted instanceof CandidateWithPresentation cwp) {
|
||||
currentMethodInfo = cwp;
|
||||
}
|
||||
if (currentMethodInfo == null) currentMethodInfo = (CandidateWithPresentation)candidates[0];
|
||||
PsiMethod method = currentMethodInfo.getMethod();
|
||||
|
||||
Reference in New Issue
Block a user