lahodaj commented on a change in pull request #1877: [NETBEANS-3604]Supports
for Records (JEP 359) in JDK-14"
URL: https://github.com/apache/netbeans/pull/1877#discussion_r367891142
##########
File path:
java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/Utilities.java
##########
@@ -557,7 +557,7 @@ private static int findBodyStartImpl(CompilationInfo info,
Tree cltree, Compilat
public static int findBodyStart(final CompilationInfo info, final Tree
cltree, final CompilationUnitTree cu, final SourcePositions positions, final
Document doc) {
Kind kind = cltree.getKind();
- if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind !=
Kind.METHOD)
+ if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind !=
Kind.METHOD && !cltree.getKind().toString().equals("RECORD"))
Review comment:
Unless this was tried already, and rejected for some reason, I would
recommend to add Tree.Kind.RECORD into TreeUtilities.CLASS_TREE_KINDS. The
purpose of that constant is to keep all kinds that map to ClassTree.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
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