drccrd commented on code in PR #3999:
URL:
https://github.com/apache/incubator-kie-tools/pull/3999#discussion_r4005274956
##########
packages/drools-lsp/drools-completion/src/main/java/org/drools/completion/DRLCompletionHelper.java:
##########
@@ -329,6 +331,28 @@ private static List<CompletionItem>
memberItemsForChain(String[] chain, String t
return null;
}
+ // After a type name Java permits only statics — the one set the
instance
+ // view cannot legally offer. A DRL declare is exempt: it has no
statics,
+ // and its enum constants are already members, which the walk below
+ // offers. Only the first hop is static; past it, instance members
+ // resume, because a constant is an ordinary value of its own type.
+ if (typeReference && typeIndex.get(simpleNameOf(rootType)) == null) {
Review Comment:
split behavior for enums and non-enums in
[ae11261](https://github.com/apache/incubator-kie-tools/pull/3999/commits/ae11261e05fe882f5370ac861878ebda5f852339)
##########
packages/drools-lsp/drools-completion/src/main/java/org/drools/completion/DRLHoverHelper.java:
##########
@@ -309,10 +311,10 @@ private static Hover hoverChain(Chain chain, String text,
Position position,
segment, segment, parsed.compilationUnit,
classIndex);
if (fqcn != null) {
if (hovered) {
- return markdown(renderJavaType(segment, fqcn,
memberIndex.membersOf(fqcn),
- memberIndex.constructorsOf(fqcn)));
+ return markdown(renderJavaType(segment, fqcn,
memberIndex));
}
runningType = fqcn;
+ fromTypeRef = true;
Review Comment:
split behavior for enums and non-enums in
[ae11261](https://github.com/apache/incubator-kie-tools/pull/3999/commits/ae11261e05fe882f5370ac861878ebda5f852339)
--
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]