asbachb commented on code in PR #6096:
URL: https://github.com/apache/netbeans/pull/6096#discussion_r1246161895


##########
enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/JsfUtils.java:
##########
@@ -99,12 +100,9 @@ public static Result getEmbeddedParserResult(ResultIterator 
resultIterator, Stri
         return null;
     }
 
-    public static Node getRoot(HtmlParserResult parserResult, LibraryInfo 
library) {
-        Node rootNode = parserResult.root(library.getNamespace());
-        if ((rootNode == null || rootNode.children().isEmpty()) && 
library.getLegacyNamespace() != null) {
-            rootNode = parserResult.root(library.getLegacyNamespace());
-        }
-        return rootNode;
+    public static Node getRoot(HtmlParserResult parserResult, LibraryInfo 
library, JsfVersion jsfVersion) {
+        String namespace = 
jsfVersion.getNamespaceUri(library.getDefaultPrefix());
+        return parserResult.root(namespace);

Review Comment:
   From my understanding the old behavior only supported one namespace at a 
time as well.
   
   e.g. when you create a new maven web application, add a new jsf site and add 
an tag which namespace is not yet present and you hit auto import you only can 
choose between the namespace of the used jsf version.
   
   From my understanding if we want to provide all compatible namespaces for a 
jsf implementation this would be an feature which is currently not present.



-- 
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

Reply via email to