SSR: fix method javadoc matching (second part of IDEA-126909)

This commit is contained in:
Bas Leijdekkers
2015-02-12 22:23:29 +01:00
parent 2c686dff7a
commit 89e8f7a2ae
2 changed files with 6 additions and 1 deletions
@@ -1673,6 +1673,11 @@ public class JavaMatchingVisitor extends JavaElementVisitor {
myMatchingVisitor.getMatchContext().pushResult();
try {
final PsiDocComment docComment = method.getDocComment();
if (docComment != null) {
myMatchingVisitor.setResult(myMatchingVisitor.match(docComment, method2));
if (!myMatchingVisitor.getResult()) return;
}
if (method.hasTypeParameters()) {
myMatchingVisitor.setResult(
myMatchingVisitor.match(method.getTypeParameterList(), ((PsiMethod)myMatchingVisitor.getElement()).getTypeParameterList()));
@@ -1676,7 +1676,7 @@ public class StructuralSearchTest extends StructuralSearchTestCase {
// javadoc comment for method
assertEquals(
"javadoc comment for method",
3,
2,
findMatchesCount(s57, s58_3)
);