matthiasblaesing commented on code in PR #9625:
URL: https://github.com/apache/netbeans/pull/9625#discussion_r4086086755
##########
enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/metamodel/ComponentImpl.java:
##########
@@ -120,4 +123,18 @@ public boolean refresh(TypeElement typeElement) {
}
return true;
}
+
+ /**
+ * @return The {@code NAMESPACE} constant of the {@code @FacesComponent}
annotation
+ */
+ private static String getDefaultNamespace(AnnotationMirror
annotationMirror) {
+ Element annotationType =
annotationMirror.getAnnotationType().asElement();
+ for (VariableElement field :
ElementFilter.fieldsIn(annotationType.getEnclosedElements())) {
+ if ("NAMESPACE".contentEquals(field.getSimpleName()) // NOI18N
+ && field.getConstantValue() instanceof String namespace) {
+ return namespace;
+ }
+ }
+ return null; // no namespace field on jsf 2.1-
Review Comment:
Makes sense. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists