matthiasblaesing commented on code in PR #8976:
URL: https://github.com/apache/netbeans/pull/8976#discussion_r2505514091


##########
enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/GetParseData.java:
##########
@@ -315,11 +329,162 @@ private static 
org.netbeans.modules.web.jsps.parserapi.PageInfo convertPageInfo(
         nbPageInfo.setXMLView(xmlView);
       
         nbPageInfo.setTagFile(ctxt.isTagFile());
-        nbPageInfo.setTagInfo(ctxt.getTagInfo());
-        
+        nbPageInfo.setTagInfo(convert(convertedObjects, ctxt.getTagInfo()));
+
         return nbPageInfo;
     }
 
+    private static org.netbeans.modules.web.jsps.parserapi.TagInfo 
convert(IdentityHashMap<Object,Object> convertedObjects, TagInfo source) {
+        if(source == null) {
+            return null;
+        }
+
+        if(convertedObjects.containsKey(source)) {
+            return (org.netbeans.modules.web.jsps.parserapi.TagInfo) 
convertedObjects.get(source);
+        }
+
+        org.netbeans.modules.web.jsps.parserapi.TagInfo result = new 
org.netbeans.modules.web.jsps.parserapi.TagInfo();
+        convertedObjects.put(source, result);
+
+        TagData td = new TagData(new Object[][]{});
+        result.setDisplayName(source.getDisplayName());
+        result.setTagClassName(source.getTagClassName());
+        result.setTagName(source.getTagName());
+        result.setBodyContent(source.getBodyContent());
+        result.setInfoString(source.getInfoString());
+        result.setTagLibrary(convert(convertedObjects, 
source.getTagLibrary()));
+        result.getAttributes().addAll(stream(source.getAttributes()).map(s -> 
convert(convertedObjects, s)).collect(Collectors.toList()));
+        
result.getVariables().addAll(stream(source.getTagVariableInfos()).map(s -> 
convert(convertedObjects, s)).collect(Collectors.toList()));
+        
result.getRuntimeVariables().addAll(stream(source.getVariableInfo(td)).map(s -> 
convert(convertedObjects, s)).collect(Collectors.toList()));
+
+        return result;
+    }
+
+    private static org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo 
convert(IdentityHashMap<Object,Object> convertedObjects, TagLibraryInfo source) 
{
+        if(source == null) {
+            return null;
+        }
+
+        if(convertedObjects.containsKey(source)) {
+            return (org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo) 
convertedObjects.get(source);
+        }
+
+        org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo result = new 
org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo();
+        convertedObjects.put(source, result);
+
+        result.setShortName(source.getShortName());
+        result.setReliableURN(source.getReliableURN());
+        result.setInfoString(source.getInfoString());
+        result.setURI(source.getURI());
+        result.setPrefixString(source.getPrefixString());
+        result.setRequiredVersion(source.getRequiredVersion());
+        result.setTlibversion(getFieldByReflection("tlibversion", source));
+        result.getTags().addAll(stream(source.getTags()).map(s -> 
convert(convertedObjects, s)).collect(Collectors.toList()));
+        result.getTagFiles().addAll(stream(source.getTagFiles()).map(s -> 
convert(convertedObjects, s)).collect(Collectors.toList()));

Review Comment:
   Done



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