Package org.eclipse.lemminx.extensions.contentmodel.participants

## 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 `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.

### Constructor Summary

Constructors
`ContentModelCodeLensParticipant​(ContentModelManager contentModelManager)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `doCodeLens​(ICodeLensRequest request, List<org.eclipse.lsp4j.CodeLens> lenses, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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:
  `doCodeLens` in interface `ICodeLensParticipant`