diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/internal/jaxrs/java/DefaultJaxRsInfoProvider.java b/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/internal/jaxrs/java/DefaultJaxRsInfoProvider.java index e63222b2d..94f24433d 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/internal/jaxrs/java/DefaultJaxRsInfoProvider.java +++ b/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/internal/jaxrs/java/DefaultJaxRsInfoProvider.java @@ -91,7 +91,8 @@ private static void collectJaxRsMethodInfo(PsiElement[] elements, String rootPat } continue; } else if (element instanceof PsiMethod) { - if (utils.isHiddenGeneratedElement(element)) { + PsiMethod method = (PsiMethod) element; + if (method.isConstructor() || utils.isHiddenGeneratedElement(element)) { continue; } // ignore element if method range overlaps the type range, diff --git a/src/main/java/com/redhat/devtools/intellij/qute/psi/QuteSupportForTemplate.java b/src/main/java/com/redhat/devtools/intellij/qute/psi/QuteSupportForTemplate.java index ca64535f1..4bab9b3f1 100644 --- a/src/main/java/com/redhat/devtools/intellij/qute/psi/QuteSupportForTemplate.java +++ b/src/main/java/com/redhat/devtools/intellij/qute/psi/QuteSupportForTemplate.java @@ -423,16 +423,18 @@ private String getJavadoc(PsiClass type, DocumentFormat documentFormat, String m // 2) Check the methods for the member PsiMethod[] methods = type.getMethods(); for (PsiMethod method : methods) { - try { - if (signature.equals(typeResolver.resolveMethodSignature(method))) { - String javadoc = utils.getJavadoc(method, documentFormat); - if (javadoc != null) { - return javadoc; + if (!method.isConstructor()) { + try { + if (signature.equals(typeResolver.resolveMethodSignature(method))) { + String javadoc = utils.getJavadoc(method, documentFormat); + if (javadoc != null) { + return javadoc; + } } + } catch (Exception e) { + LOGGER.log(Level.SEVERE, "Error while getting method signature of '" + method.getName() + "'.", + e); } - } catch (Exception e) { - LOGGER.log(Level.SEVERE, "Error while getting method signature of '" + method.getName() + "'.", - e); } } diff --git a/src/main/java/com/redhat/microprofile/psi/internal/quarkus/renarde/java/RenardeJaxRsInfoProvider.java b/src/main/java/com/redhat/microprofile/psi/internal/quarkus/renarde/java/RenardeJaxRsInfoProvider.java index 5f868a113..ec7f5d3b5 100644 --- a/src/main/java/com/redhat/microprofile/psi/internal/quarkus/renarde/java/RenardeJaxRsInfoProvider.java +++ b/src/main/java/com/redhat/microprofile/psi/internal/quarkus/renarde/java/RenardeJaxRsInfoProvider.java @@ -62,7 +62,7 @@ public List getJaxRsMethodInfo(PsiFile typeRoot, JaxRsContext j List methodInfos = new ArrayList<>(); for (PsiMethod method : type.getMethods()) { - if (utils.isHiddenGeneratedElement(method)) { + if (method.isConstructor() || utils.isHiddenGeneratedElement(method)) { continue; } // ignore element if method range overlaps the type range,