Vixen
02b45cc4
csharp
public sealed class MarkupDocument

A VXML component, open for editing, with a bound tree the preview pane draws.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Lex, parse and bind. The binder is where the useful complaints are — an unclosed tag, an attribute on a tag that has none, an @for body whose elements have no key — and it produces a BoundComponent, which is the thing a preview can be built from without a Roslyn compilation.

⚠ The preview is the static structure and not the running component. A .vxml becomes a C# partial class, so a genuinely live preview means compiling and loading the generated type — which is the hot-reload pipeline doc 09 describes and doc 11 wants this pane to sit on. What is here is one step short of it and is what makes the pane useful today: the element tree with its literal attributes, its text, and a placeholder where an expression would go. Layout and styling — which is most of what a .vxml is being edited for — are exactly right in that picture; state and bindings are not there at all, and the pane says so rather than pretending.

Fields and properties (3)

  • public const string Extension

    What a VXML component is written as.

  • public BoundComponent? Component

    The bound component, as of the last analysis, or .

  • public override ICodeTokenizer Tokenizer

Methods (2)

  • public MarkupDocument(EditorProject project, AssetId asset, string path)

    Opens a VXML component.

  • protected override IReadOnlyList<CodeDiagnostic> Analyse(string text)

    What is wrong with a text, for whatever language this document is.

Used by (4)

  • CodeAnalysisTestsVixen.Editor.AssetEditors.Tests
  • EditorViewTestsVixen.Editor.AssetEditors.Tests
  • MarkupEditorFactoryVixen.Editor.AssetEditors
  • PreviewCodeEditorViewVixen.Editor.AssetEditors