Class XMLReferencesPlugin
java.lang.Object
org.eclipse.lemminx.extensions.references.XMLReferencesPlugin
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoSave(ISaveContext context) Called when the Settings or a Document have been saved.voidstart(org.eclipse.lsp4j.InitializeParams params, XMLExtensionsRegistry registry) Start method to register participants likeICompletionParticipant,IHoverParticipant,IDiagnosticsParticipantin the given registry.voidstop(XMLExtensionsRegistry registry) Stop method to un-register participants likeICompletionParticipant,IHoverParticipant,IDiagnosticsParticipantin the given registry.
-
Constructor Details
-
XMLReferencesPlugin
public XMLReferencesPlugin()
-
-
Method Details
-
doSave
Description copied from interface:IXMLExtensionCalled 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:
doSavein interfaceIXMLExtension
-
start
Description copied from interface:IXMLExtensionStart method to register participants likeICompletionParticipant,IHoverParticipant,IDiagnosticsParticipantin the given registry.- Specified by:
startin interfaceIXMLExtension
-
stop
Description copied from interface:IXMLExtensionStop method to un-register participants likeICompletionParticipant,IHoverParticipant,IDiagnosticsParticipantin the given registry.- Specified by:
stopin interfaceIXMLExtension
-
getReferencesSettings
-