microsoft / microsoft/WinAppVSCE

Refactor: Consider DOM-backed XML context detection for IntelliSense

Open
#105 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement tech-debt
Dominant language
TypeScript
Stars
13
Forks
3
Avg merge
6d 1h
Merged PRs (30d)
11

Description

Summary

src/manifest-schema/xml-context.ts uses a large hand-rolled regex/state-machine XML parser for cursor context detection, while the rest of the codebase uses @xmldom/xmldom for DOM-based parsing.

Recommendation

Consider a hybrid approach: use DOM-backed context builder for the completed document prefix, and keep regex only for the incomplete current tag suffix where DOM parsing would fail.

Context

Found during PR review of #68 (AppxManifest IntelliSense feature). Note: the hand-rolled approach was chosen because IntelliSense needs to work with incomplete/malformed XML at the cursor position, which DOM parsers reject. A full rewrite is not trivial.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/manifest-schema/xml-context.ts and review PR #68 for the existing AppxManifest IntelliSense context-detection requirements. Understand how the current regex/state-machine handles incomplete XML and how @xmldom/xmldom is used elsewhere; done requires an agreed, validated hybrid design that preserves cursor-context detection for malformed or incomplete input.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.