Class XMLCatalogTypeDefinitionParticipant
java.lang.Object
org.eclipse.lemminx.services.extensions.AbstractTypeDefinitionParticipant
org.eclipse.lemminx.extensions.catalog.participants.XMLCatalogTypeDefinitionParticipant
- All Implemented Interfaces:
ITypeDefinitionParticipant
Provides "Go to Type Definition" locations for the catalog entries that bind
the XML document's namespace to its grammar.
When the user triggers type-definition on an XML element whose namespace
URI is mapped by a catalog entry (<namespace> or <uri>),
this participant returns a LocationLink pointing to that entry in the
catalog file, in addition to the XSD type location returned by the content-
model participant.
Example:
order.xml: <order xmlns="http://example.org/order"> ← type definition here catalog.xml: <namespace name="http://example.org/order" uri="order.xsd"/> ← navigates here too
-
Constructor Summary
ConstructorsConstructorDescriptionXMLCatalogTypeDefinitionParticipant(ContentModelManager contentModelManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFindTypeDefinition(ITypeDefinitionRequest request, List<org.eclipse.lsp4j.LocationLink> locations, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Find the type definitionprotected booleanmatch(DOMDocument document) Returns true if the type definition support is applicable for the given document and false otherwise.Methods inherited from class org.eclipse.lemminx.services.extensions.AbstractTypeDefinitionParticipant
findTypeDefinition
-
Constructor Details
-
XMLCatalogTypeDefinitionParticipant
-
-
Method Details
-
match
Description copied from class:AbstractTypeDefinitionParticipantReturns true if the type definition support is applicable for the given document and false otherwise.- Specified by:
matchin classAbstractTypeDefinitionParticipant- Parameters:
document-- Returns:
- true if the type definition support is applicable for the given document and false otherwise.
-
doFindTypeDefinition
protected void doFindTypeDefinition(ITypeDefinitionRequest request, List<org.eclipse.lsp4j.LocationLink> locations, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker) Description copied from class:AbstractTypeDefinitionParticipantFind the type definition- Specified by:
doFindTypeDefinitionin classAbstractTypeDefinitionParticipant- Parameters:
request-locations-cancelChecker-
-