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