Package org.eclipse.lemminx.extensions.references

## Class XMLReferencesPlugin

- java.lang.Object
- - org.eclipse.lemminx.extensions.references.XMLReferencesPlugin

All Implemented Interfaces:
  `IXMLExtension`

    public class XMLReferencesPlugin
    extends Object
    implements IXMLExtension

XML references plugin. This plugin provides the capability to support completion, definition, etc for references between 2 attributes declared in a 'xml.references' settings. Given this XML: `
` To benefit with: - completion support when @linkend value will be trigger - go to the definition of MyId from the @linked attribute the following xml references settings must be configured: `"xml.references": [ // references for docbook.xml files { "pattern": "*.xml", "expressions": [ { "from": "xref/@linkend", "to": "@id" } ] } ]`

Author:
  Angelo ZERR

### Constructor Summary

Constructors
`XMLReferencesPlugin()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `doSave​(ISaveContext context)` Called when the Settings or a Document have been saved.
`XMLReferencesSettings` `getReferencesSettings()`
`void` `start​(org.eclipse.lsp4j.InitializeParams params, XMLExtensionsRegistry registry)` Start method to register participants like `ICompletionParticipant`, `IHoverParticipant`, `IDiagnosticsParticipant` in the given registry.
`void` `stop​(XMLExtensionsRegistry registry)` Stop method to un-register participants like `ICompletionParticipant`, `IHoverParticipant`, `IDiagnosticsParticipant` in the given registry.

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

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

### Constructor Detail

#### XMLReferencesPlugin

    public XMLReferencesPlugin()

### Method Detail

#### doSave

    public void doSave​(ISaveContext context)

Description copied from interface: `IXMLExtension`
Called when the Settings or a Document have been saved. context.getType() can be used to determine what type was saved. doSave is called on extension start up with a settings context to provide the xml settings to the extension.

Specified by:
  `doSave` in interface `IXMLExtension`

#### start

    public void start​(org.eclipse.lsp4j.InitializeParams params,
                      XMLExtensionsRegistry registry)

Description copied from interface: `IXMLExtension`
Start method to register participants like `ICompletionParticipant`, `IHoverParticipant`, `IDiagnosticsParticipant` in the given registry.

Specified by:
  `start` in interface `IXMLExtension`

#### stop

    public void stop​(XMLExtensionsRegistry registry)

Description copied from interface: `IXMLExtension`
Stop method to un-register participants like `ICompletionParticipant`, `IHoverParticipant`, `IDiagnosticsParticipant` in the given registry.

Specified by:
  `stop` in interface `IXMLExtension`

#### getReferencesSettings

    public XMLReferencesSettings getReferencesSettings()