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 2022/03/27 00:38:42 UTC
[GitHub] [netbeans] mbien commented on a change in pull request #3266: Support for JEP 413: Snippet java docs
mbien commented on a change in pull request #3266:
URL: https://github.com/apache/netbeans/pull/3266#discussion_r835828563
##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/TreeShims.java
##########
@@ -364,6 +366,31 @@
// }
// return null;
// }
+ public static List<DocTree> getSnippetDocTreeAttributes(DocTree node) {
+ try {
+ Class gpt = Class.forName("com.sun.source.doctree.SnippetTree"); //NOI18N
+ return isJDKVersionRelease18_Or_Above()
+ ? (List<DocTree>) gpt.getDeclaredMethod("getAttributes").invoke(node) //NOI18N
+ : null;
Review comment:
nb-javac based on JDK 18 has been integrated with #3729, I believe the classes can now be used without reflection/version checks.
--
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