lahodaj commented on a change in pull request #2283:
URL: https://github.com/apache/netbeans/pull/2283#discussion_r463615083
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/TreeShims.java
##########
@@ -149,6 +151,33 @@ public static Name getBinding(Tree node) {
}
}
+ public static List<JCTree.JCExpression> getPermits(JCClassDecl newT) {
Review comment:
Please do not return internal javac types (i.e. anything from
com.sun.tools.**) from API or semi-API methods like this. It should be simply
List<ExpressionTree>, or something similar.
##########
File path:
java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
##########
@@ -22,6 +22,7 @@
import com.sun.source.tree.*;
import com.sun.source.tree.Tree.Kind;
import com.sun.source.util.*;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
Review comment:
Please no internal types inside language features (besides the language
infrastructure, like java.source{.base}, etc.).
##########
File path:
java/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/CreateConstructorNonDefaultConstructor.pass
##########
@@ -25,9 +25,11 @@ int
interface
long
native
+non-sealed
Review comment:
I think I would prefer to only have the keywords for an appropriate
source level. The existing tests are probably not setting source level to 14,
so I would incline to not add the keywords there. New tests may set source
level to 14 and check the keywords are proposed by the code completion.
----------------------------------------------------------------
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