fix: improve data container context hints and LSP completion#184
Open
engalar wants to merge 1 commit intomendixlabs:mainfrom
Open
fix: improve data container context hints and LSP completion#184engalar wants to merge 1 commit intomendixlabs:mainfrom
engalar wants to merge 1 commit intomendixlabs:mainfrom
Conversation
…abs#168 review) Address 3 review comments from PR mendixlabs#168: 1. extractPageParamNames: switch from full-document $Name scanning to $Name: Type declaration pattern matching, eliminating false positives from $currentObject references, body $var usage, and comment lines. 2. EntityContext propagation: add parentEntityContext parameter to parseRawWidget() so nested containers without own DataSource inherit parent context. Propagate through all child-parsing functions. 3. LSP $ completion: add scanEnclosingDataContainer() that scans upward from cursor with brace matching to find nearest data container. Shows $currentObject with entity type and $widgetName selection variables.
AI Code ReviewCritical Issues(None found) Moderate Issues(None found) Minor Issues(None found) What Looks Good
RecommendationApprove the PR. The changes correctly address the identified issues with minimal risk, good test coverage, and adherence to project conventions. The improvements enhance both the accuracy of MDL parsing and the usefulness of LSP completion without violating any design principles. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extractPageParamNamesto use$Name: Typedeclaration pattern matching instead of full-document$Namescanning, eliminating false positives from$currentObject, body$varreferences, and comment linesEntityContextthrough nested widget tree so data containers without own DataSource inherit parent context (fixes missing context comments for nested DataView via association)$completion to show$currentObjectwith actual entity type and$widgetNameselection variables for list containersAddresses review comments from #168.
Test plan
extractPageParamNames— 7 test cases including false positive rejectionscanEnclosingDataContainer— 4 test cases (DATAVIEW, DATAGRID, no container, nested)variableCompletionItems— 2 test cases (basic, DataGrid with entity type + selection)outputWidgetMDLV3— 2 new inherited context tests (DataView, DataGrid column)make buildandmake testpass