drccrd commented on code in PR #3999:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3999#discussion_r4006965009


##########
packages/drools-lsp/drools-completion/src/main/java/org/drools/completion/DeclaredType.java:
##########
@@ -51,4 +52,21 @@ public class DeclaredType {
         this.nameCol = nameCol;
         this.extendsName = extendsName;
     }
+
+    /**
+     * The constants of a declared enum — the fields carrying the enum's own
+     * name as their type — or an empty list for a non-enum declare.
+     */
+    List<Field> enumConstants() {
+        if (!isEnum) {
+            return List.of();
+        }
+        List<Field> constants = new ArrayList<>();
+        for (Field field : fields) {
+            if (name.equals(field.type)) {
+                constants.add(field);

Review Comment:
   From the suppressed comments from the last review the `varargs` point, the 
`[][]` point, and the documentation point were also all addressed in individual 
commits



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to