Add UI file processing, symbol table tracking, and diagnostics scaffolding for resource_pack/ui/*#327
Draft
Add UI file processing, symbol table tracking, and diagnostics scaffolding for resource_pack/ui/*#327
Conversation
… pack UI definitions Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add symbol table for @-resolution and $-tracking support
Add UI file processing, symbol table tracking, and diagnostics scaffolding for resource_pack/ui/*
Mar 20, 2026
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.
The language server had no awareness of
resource_pack/ui/files — no file type detection, no symbol table entries, and no diagnostic hooks, leaving UI definitions completely unvalidated.Changes
bedrock-project— FileType & Detectionuivariant toFileTypeenumui/folder regex match inFileType.detect()ui/hud_screen.jsondetectionbedrock-project— Internal Typesinternal/resource-pack/ui.ts:UIinterface +UI.is()type guard; detects files by presence of anamespacestring or object-valued element definitionsbedrock-project— Symbol Table (project/resource-pack/ui/)UIElementproject type extendingBaseObjectprocess()function extracts all element identifiers asnamespace.element_nameIDs, stripping@inheritancesuffixes from keysResourcePackgainsui_elements: DataSet<UIElement>, wired intoprocess(),getDataset(),deleteFolder(),deleteFile(),find(), andforEach()ResourcePackCollectiongainsui_elements: DataSetConnectorbedrock-diagnoser— Diagnostics Hookdiagnostics/resource-pack/ui/entry.tsstub:diagnose_ui_document()— ready to add@-inheritance resolution and$-variable trackingFileType.uicase wired into theResourcePack.diagnose_document()switchExample: how UI elements are indexed into the symbol table
Produces entries:
hud.root_panel,hud.health_barinui_elements.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.