mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
SSR: better matching for comments on Java methods (IJPL-149678)
GitOrigin-RevId: e66768fcb9adbf0fd7ca0be950d4da41373a918d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
816d61b8bf
commit
66ad661ec7
@@ -1829,15 +1829,17 @@ public class JavaMatchingVisitor extends JavaElementVisitor {
|
||||
|
||||
context.pushResult();
|
||||
try {
|
||||
final PsiDocComment docComment = method.getDocComment();
|
||||
if (docComment != null && !myMatchingVisitor.setResult(myMatchingVisitor.match(docComment, other.getDocComment()))) return;
|
||||
if (method.hasTypeParameters() && !myMatchingVisitor.setResult(
|
||||
myMatchingVisitor.match(method.getTypeParameterList(), other.getTypeParameterList()))) return;
|
||||
|
||||
final PsiElement docComment = method.getFirstChild();
|
||||
if (docComment instanceof PsiComment && !myMatchingVisitor.setResult(myMatchingVisitor.match(docComment, other.getFirstChild()))) {
|
||||
return;
|
||||
}
|
||||
if (method.hasTypeParameters() &&
|
||||
!myMatchingVisitor.setResult(myMatchingVisitor.match(method.getTypeParameterList(), other.getTypeParameterList()))) {
|
||||
return;
|
||||
}
|
||||
if (!myMatchingVisitor.setResult(checkHierarchy(other, method))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!myMatchingVisitor.setResult((!method.isConstructor() || other.isConstructor()) &&
|
||||
(isTypedVar || myMatchingVisitor.matchText(methodNameNode, other.getNameIdentifier())) &&
|
||||
myMatchingVisitor.match(method.getModifierList(), other.getModifierList()))) {
|
||||
|
||||
Reference in New Issue
Block a user