Class ContentModelCodeLensParticipant
java.lang.Object
org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelCodeLensParticipant
- All Implemented Interfaces:
ICodeLensParticipant
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
AssociateGrammarCommandto generate the proper syntax for binding with following parameters:- the document uri.
- the selected grammar/schema file uri.
- the binding type.
TextDocumentEditwhich must be applied on the LSP client side.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoCodeLens(ICodeLensRequest request, List<org.eclipse.lsp4j.CodeLens> lenses, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
-
Constructor Details
-
ContentModelCodeLensParticipant
-
-
Method Details
-
doCodeLens
public void doCodeLens(ICodeLensRequest request, List<org.eclipse.lsp4j.CodeLens> lenses, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) - Specified by:
doCodeLensin interfaceICodeLensParticipant
-