You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/17 19:17:33 UTC

[GitHub] [netbeans] jherkel opened a new pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

jherkel opened a new pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544


   see https://issues.apache.org/jira/browse/NETBEANS-1309


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#issuecomment-1014623670


   Can't keep pushing this around.  Removing milestone and marking stale, until someone wants to review and merge.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jlahoda commented on a change in pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
jlahoda commented on a change in pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#discussion_r528488209



##########
File path: java/java.sourceui/src/org/netbeans/api/java/source/ui/ElementJavadoc.java
##########
@@ -1280,6 +1282,22 @@ private StringBuilder inlineTags(List<? extends DocTree> tags, TreePath docPath,
                 case TEXT:
                     TextTree ttag = (TextTree)tag;
                     sb.append(ttag.getBody());
+                    break;
+                default : {
+                    // process tags that we cannot add directly because they are not accessible during compilation
+                    DocTree.Kind values[] = tag.getKind().getClass().getEnumConstants();

Review comment:
       For consideration here, how about, instead of finding the summaryTag, there would be just `if ("SUMMARY".equals(tag.getKind().name())) ..` or `switch (tag.getKind().name()) { case "SUMMARY":`?

##########
File path: java/java.editor/src/org/netbeans/modules/java/editor/javadoc/TagRegistery.java
##########
@@ -48,18 +50,17 @@ public static TagRegistery getDefault() {
         return DEFAULT;
     }
 
-    public List<TagEntry> getTags(ElementKind kind, boolean inline) {
-        List<TagEntry> selection = new ArrayList<TagEntry>();
-        for (TagEntry te : tags) {
-            if (te.isInline == inline && te.whereUsed.contains(kind)) {
-                selection.add(te);
-            }
-        }
+    public List<TagEntry> getTags(ElementKind kind, boolean inline,SourceVersion sourceVersion) {
+        List<TagEntry> selection = tags.stream().filter(te -> (te.isInline == inline 
+            && te.whereUsed.contains(kind)
+            && sourceVersion.ordinal() >= te.minJavaVersion 

Review comment:
       The use of integer versions and ordinals is not particularly nice, but I suspect this unfortunatelly cannot be avoided here.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
ebarboni commented on pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#issuecomment-884227086


   this PR is a bit old but maybe @jlahoda may say it's ok to merge for 12.5. 


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] geertjanw commented on pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#issuecomment-812537914


   Any reason not to merge?


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] ebarboni commented on pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
ebarboni commented on pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#issuecomment-887333003


   postponing until decision


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jherkel commented on a change in pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
jherkel commented on a change in pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#discussion_r546433569



##########
File path: java/java.sourceui/src/org/netbeans/api/java/source/ui/ElementJavadoc.java
##########
@@ -1280,6 +1282,22 @@ private StringBuilder inlineTags(List<? extends DocTree> tags, TreePath docPath,
                 case TEXT:
                     TextTree ttag = (TextTree)tag;
                     sb.append(ttag.getBody());
+                    break;
+                default : {
+                    // process tags that we cannot add directly because they are not accessible during compilation
+                    DocTree.Kind values[] = tag.getKind().getClass().getEnumConstants();

Review comment:
       I added unit test, but need to change some additional files because I have to set correct source level.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jherkel commented on a change in pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
jherkel commented on a change in pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#discussion_r529804376



##########
File path: java/java.sourceui/src/org/netbeans/api/java/source/ui/ElementJavadoc.java
##########
@@ -1280,6 +1282,22 @@ private StringBuilder inlineTags(List<? extends DocTree> tags, TreePath docPath,
                 case TEXT:
                     TextTree ttag = (TextTree)tag;
                     sb.append(ttag.getBody());
+                    break;
+                default : {
+                    // process tags that we cannot add directly because they are not accessible during compilation
+                    DocTree.Kind values[] = tag.getKind().getClass().getEnumConstants();

Review comment:
       I will change it in accordance with your proposal. But I don't know how to add unit test that is executed only with JDK 11 for example. Is there any example how to do it?

##########
File path: java/java.editor/src/org/netbeans/modules/java/editor/javadoc/TagRegistery.java
##########
@@ -48,18 +50,17 @@ public static TagRegistery getDefault() {
         return DEFAULT;
     }
 
-    public List<TagEntry> getTags(ElementKind kind, boolean inline) {
-        List<TagEntry> selection = new ArrayList<TagEntry>();
-        for (TagEntry te : tags) {
-            if (te.isInline == inline && te.whereUsed.contains(kind)) {
-                selection.add(te);
-            }
-        }
+    public List<TagEntry> getTags(ElementKind kind, boolean inline,SourceVersion sourceVersion) {
+        List<TagEntry> selection = tags.stream().filter(te -> (te.isInline == inline 
+            && te.whereUsed.contains(kind)
+            && sourceVersion.ordinal() >= te.minJavaVersion 

Review comment:
       I couldn't use SourceVersion but I think (and hope) that SourceVersion enum is constructed in a way that ordinal method equals java version. Also I found this bug (https://bugs.openjdk.java.net/browse/JDK-8253545) with comment from Joe Darcy confirming my assumption.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] geertjanw commented on pull request #2544: [NETBEANS-1309] add support for @summary javadoc tag

Posted by GitBox <gi...@apache.org>.
geertjanw commented on pull request #2544:
URL: https://github.com/apache/netbeans/pull/2544#issuecomment-821065140


   Changing milestone to 12.5.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists