Skip to content

feat(completion): scope ?Ctrl field-equate completion to the current procedure - #385

Open
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:feat/field-equate-completion
Open

feat(completion): scope ?Ctrl field-equate completion to the current procedure#385
geircodes wants to merge 1 commit into
msarson:version-1.0.1from
geircodes:feat/field-equate-completion

Conversation

@geircodes

Copy link
Copy Markdown

Typing '?' inside a procedure now offers that procedure's control equates (?OkButton etc.) as completions, scoped to the WINDOW/APPLICATION/REPORT structures declared in the CURRENT procedure only — controls belonging to other procedures' windows are excluded since they aren't reachable from here.

  • server.ts: register '?' as a completion trigger character
  • DocumentStructure.ts: getContainerStructuresInProcedure() finds container structures declared inside a given procedure's body, backed by the existing structuresByType index (no extra token walk)
  • CompletionProvider.ts: handleFieldEquateCompletion() matches a trailing '?'/'?partial', resolves the current procedure via ScopeAnalyzer, and returns only its controls as CompletionItemKind.Constant (a field equate is a compiler-generated EQUATE, same kind already used for hand-written ones)

…procedure

Typing '?' inside a procedure now offers that procedure's control equates
(?OkButton etc.) as completions, scoped to the WINDOW/APPLICATION/REPORT
structures declared in the CURRENT procedure only — controls belonging to
other procedures' windows are excluded since they aren't reachable from here.

- server.ts: register '?' as a completion trigger character
- DocumentStructure.ts: getContainerStructuresInProcedure() finds container
  structures declared inside a given procedure's body, backed by the existing
  structuresByType index (no extra token walk)
- CompletionProvider.ts: handleFieldEquateCompletion() matches a trailing
  '?'/'?partial', resolves the current procedure via ScopeAnalyzer, and
  returns only its controls as CompletionItemKind.Constant (a field equate is
  a compiler-generated EQUATE, same kind already used for hand-written ones)
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