Skip to content

fix(hover): resolve GROUP(TypeName)/QUEUE(TypeName)/RECORD(TypeName) … - #383

Open
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:fix/chained-group-hover-extractclassname
Open

fix(hover): resolve GROUP(TypeName)/QUEUE(TypeName)/RECORD(TypeName) …#383
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:fix/chained-group-hover-extractclassname

Conversation

@geircodes

Copy link
Copy Markdown

Summary

ClassMemberResolver.extractClassName() decides whether an intermediate segment in a chained dot-access expression (e.g. SELF.Order.MainKey) is "navigable" — i.e. whether the resolver should keep walking into that segment's declared type to find the next member. It already special-cased LIKE(TypeName), unwrapping the parens to get the referenced type name, but had no equivalent case for a class property declared as GROUP(TypeName), QUEUE(TypeName), or RECORD(TypeName) (e.g. Settings GROUP(ConnectionSettingsType) END).

Without that case, the type string fell through to the generic name.split(/[,(]/)[0] split, which strips everything down to the bare keyword (GROUP) — and since GROUP/QUEUE/RECORD are themselves listed in CLARION_PRIMITIVES, the type was rejected as "not navigable" and the chain walk aborted right there.

Impact: any chained hover/member access one level past a GROUP/QUEUE/RECORD-typed class property silently returns no hover, even though the target field is indexed correctly. Concretely: SELF.Settings.Address (where Settings is GROUP(ConnectionSettingsType) END) resolves hover fine on SELF and on Settings, but hovering Address returns nothing — despite the field being locatable via a plain symbol search without issue. Confirmed the same failure is independent of whether the referenced group type itself is declared with , TYPE — the bug is purely in parsing the usage site's type string, not the type declaration.

Fix: add a GROUP|QUEUE|RECORD(TypeName) case mirroring the existing LIKE(TypeName) handling, placed before the generic comma/paren split, so the chain keeps walking into the referenced type's fields.

Test plan

  • npx tsc -b — clean compile
  • Full test suite: 2346 passing, 0 failing, 4 pending (pre-existing, unrelated) — up from 2340 baseline (6 new extractClassName cases added: GROUP(TypeName), GROUP(TypeName) END verbatim-scanned-line shape, QUEUE(TypeName), RECORD(TypeName), trailing-attribute form, and a guard that bare GROUP alone still returns null)
  • Manually verified via hover against a real Clarion class with a GROUP(TypeName)-typed class property — hover on the chained field access returned nothing before the fix, correctly resolves to the field's declaration after rebuilding and redeploying the LSP into a live Clarion IDE session

🤖 Generated with Claude Code

…in extractClassName

ClassMemberResolver.extractClassName() already unwrapped LIKE(TypeName)
to get a navigable type name, but had no equivalent case for a class
property declared as GROUP(TypeName)/QUEUE(TypeName)/RECORD(TypeName).
Those fell through to the generic comma/paren split, which strips down
to the bare keyword ("GROUP"), and since GROUP/QUEUE/RECORD are in
CLARION_PRIMITIVES the type was rejected as "not navigable".

This breaks ChainedPropertyResolver one segment past any GROUP-typed
class property: SELF.Settings.Address (where Settings is declared as
GROUP(ConnectionSettingsType) END) resolves hover fine on SELF and on
Settings, but hovering Address silently returns nothing, even though
the field is indexed correctly and locatable via a plain symbol search.

Add a GROUP|QUEUE|RECORD (TypeName) case mirroring the existing LIKE()
handling, so the chain keeps walking into the referenced type's fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant