AMashenkov commented on a change in pull request #7839:
URL: https://github.com/apache/ignite/pull/7839#discussion_r443001741



##########
File path: 
modules/tools/src/main/java11/org/apache/ignite/tools/javadoc/IgniteLinkTaglet.java
##########
@@ -69,65 +67,59 @@
         return true;
     }
 
-    /**
-     * Register this Taglet.
-     *
-     * @param tagletMap the map to register this tag to.
-     */
-    public static void register(Map<String, IgniteLinkTaglet> tagletMap) {
-        IgniteLinkTaglet tag = new IgniteLinkTaglet();
-
-        Taglet t = tagletMap.get(tag.getName());
-
-        if (t != null)
-            tagletMap.remove(tag.getName());
-
-        tagletMap.put(tag.getName(), tag);
-    }
-
     /**
      * Given the <code>Tag</code> representation of this custom tag, return 
its string representation.
      * <p>
      * Input: 
org.apache.ignite.grid.spi.indexing.h2.GridH2IndexingSpi#setIndexCustomFunctionClasses(Class[])
      * <p>
-     * Output: <a 
href="../../../../../org/apache/ignite/grid/spi/indexing/h2/GridH2IndexingSpi.html#
-     * setIndexCustomFunctionClasses(java.lang.Class...)">
-     * 
<code>GridH2IndexingSpi.setIndexCustomFunctionClasses(java.lang.Class[])</code></a>
+     * Output: &lt;a 
href="../../../../../org/apache/ignite/grid/spi/indexing/h2/GridH2IndexingSpi.html#
+     * setIndexCustomFunctionClasses(java.lang.Class...)"&gt;
+     * 
&lt;code&gt;GridH2IndexingSpi.setIndexCustomFunctionClasses(java.lang.Class[])&lt;/code&gt;&lt;/a&gt;
      *
-     * @param tag <code>Tag</code> representation of this custom tag.
+     * @param tags <code>DocTree</code> representation of this custom tag.
      */
-     public String toString(Tag tag) {
-        if (tag.text() == null || tag.text().isEmpty())
-            return "";
+    @Override public String toString(List<? extends DocTree> tags, Element 
element) {
+        for (DocTree tag : tags) {
+            String text = new SimpleDocTreeVisitor<String, Void>() {
+                @Override public String 
visitUnknownInlineTag(UnknownInlineTagTree node, Void param) {
+                    return node.getContent().toString();
+                }
+            }.visit(tag, null);
 
-        File f = tag.position().file();
+            if (text == null || text.isEmpty())
+                return "";
 
-        String curClass = f == null ? "" : 
f.getAbsolutePath().replace(File.separator, ".");
+            File f = new 
File(env.getDocTrees().getPath(element).getCompilationUnit().getSourceFile().toUri());

Review comment:
       This looks like a traverse tree operation ".getPath(element)".
   Is there any reason to do this more than once?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to