Class ContentModelCodeLensParticipant
- java.lang.Object
-
- org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelCodeLensParticipant
-
- All Implemented Interfaces:
ICodeLensParticipant
public class ContentModelCodeLensParticipant extends Object implements 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 Constructor Description ContentModelCodeLensParticipant(ContentModelManager contentModelManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoCodeLens(ICodeLensRequest request, List<org.eclipse.lsp4j.CodeLens> lenses, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
-
-
-
Constructor Detail
-
ContentModelCodeLensParticipant
public ContentModelCodeLensParticipant(ContentModelManager contentModelManager)
-
-
Method Detail
-
doCodeLens
public void doCodeLens(ICodeLensRequest request, List<org.eclipse.lsp4j.CodeLens> lenses, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
- Specified by:
doCodeLensin interfaceICodeLensParticipant
-
-