Skip to content

Add <field> and <function> completions in xml interfaces#1748

Open
chrisdp wants to merge 3 commits into
masterfrom
feature/xml-field-function-completions
Open

Add <field> and <function> completions in xml interfaces#1748
chrisdp wants to merge 3 commits into
masterfrom
feature/xml-field-function-completions

Conversation

@chrisdp

@chrisdp chrisdp commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Extend XML completions to the <interface> block:

  • Inside <interface>, offer <field> and <function> element completions.
  • Inside a <field> start tag, offer its attributes (id, type, value, onChange, alwaysNotify, alias).
  • Inside a <function> start tag, offer name.

Builds on #1741. The existing xml snippets are unchanged.

chrisdp added 3 commits July 7, 2026 12:32
Provide IntelliSense in .xml component files, driven by the built-in
roku-types node metadata and project components.

- Program: getSceneGraphNodeNames/getSceneGraphNodeFields (resolves the
  extends chain across built-in nodes and project components),
  hasSceneGraphNode, getSceneGraphNode
- XmlFile.getCompletions: element (tag name) completions after `<` and in
  element content, and field (attribute) completions inside a start tag;
  adds getTokenAt for token-at-position lookups
- LanguageServer: add `<` as a completion trigger character
- SGParser: skip malformed child elements with no tag name instead of
  throwing (a lone `<` while typing)
- roku-types: add `extends` to SGNodeData
Node and component element completions were appearing everywhere in element
content (the component root, inside <interface>, etc.). Gate them on the
enclosing element so they only appear inside a <children> block or nested
inside another node; other locations now yield no node completions.
Inside an <interface> block, offer <field> and <function> element
completions, and inside a <field>/<function> start tag offer their
attributes (id, type, value, onChange, alwaysNotify, alias / name).
Base automatically changed from feature/xml-completions to master July 8, 2026 12:24
@chrisdp

chrisdp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Still need to address the following:

  • completions for the values of type, onChange, alwaysNotify, and aliasinfield` tag
  • completions for name in function tag

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