At first this participant is enabled only when LSP client can support the
client command "xml.open.binding.wizard" to open the wizard to bind a XML to
a grammar/schema.
In this case, when XML file is not associated to a grammar/schema (DTD, XSD),
this class generates [Bind to grammar/schema...] CodeLens on the root of the
DOM Document:
On client side, click on this Codelens should open a wizard:
- page1 : display a combo to select the binding type ("standard",
"xml-model").
- page2: open a file dialog to select the grammar/schema (XSD/DTD) to
bind.
- the finish wizard should consume the "xml.associate.grammar.insert"
command
AssociateGrammarCommand
to generate the proper syntax for
binding with following parameters:
- the document uri.
- the selected grammar/schema file uri.
- the binding type.
In other words the "xml.associate.grammar.insert" returns the
TextDocumentEdit
which must be applied on the LSP client side.