arusinha commented on a change in pull request #2222:
URL: https://github.com/apache/netbeans/pull/2222#discussion_r460667984
##########
File path:
java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
##########
@@ -3008,10 +3027,194 @@ private void insideBreakOrContinue(Env env) throws
IOException {
}
}
}
+
+ private void addClassTypes(final Env env, DeclaredType baseType) throws
IOException{
+ EnumSet<ElementKind> classKinds = EnumSet.of(CLASS, INTERFACE, ENUM,
ANNOTATION_TYPE, TYPE_PARAMETER);
+ if (isRecordSupported(env, null)) {
+ classKinds.add(TreeShims.getRecordKind());
+ }
+ addTypes(env, classKinds, null);
+ }
+
+ private boolean isRecordSupported(final Env env, String prefix) {
Review comment:
Corrected the method signature now.
We are not using enable-preview flag to enable/disable text-block
auto-completion. Propose to retain the same behavior. If someone types "rec" it
will be auto completed to "record" . He/She can then use the enable-preview
hint to add the required parameter
----------------------------------------------------------------
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