Class XMLExtensionsRegistry
java.lang.Object
org.eclipse.lemminx.services.extensions.XMLExtensionsRegistry
- All Implemented Interfaces:
IComponentProvider,IDiagnosticsRefresher
- Direct Known Subclasses:
XMLLanguageService
public class XMLExtensionsRegistry
extends Object
implements IComponentProvider, IDiagnosticsRefresher
XML extensions registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Unregisters all registered extensions.voiddoSave(ISaveContext saveContext) Returns the LS command service<T> TgetComponent(Class clazz) Returns the component class instance from the given class and null otherwise.Return the registered document lifecycle participants.Returns the XML Document provider and null otherwise.Return the registered inlay hint participants.Return the registered inline completion participants.Returns the notification serviceReturn the registered semantic tokens participants.Returns the XML document validation serviceReturn the registered workspace service participants.voidvoidinitializeParams(org.eclipse.lsp4j.InitializeParams params) voidnotifyInitialized(org.eclipse.lsp4j.InitializedParams params) voidRequests a code-lens refresh for all open documents.voidrefreshCodeLenses(Predicate<String> uriFilter) Requests a code-lens refresh, but only if at least one open document has a URI accepted byuriFilter.voidrefreshDiagnostics(Predicate<DOMDocument> documentFilter) Triggers a diagnostics re-publish for all open documents accepted bydocumentFilter.voidregisterCodeActionParticipant(ICodeActionParticipant codeActionsParticipant) voidregisterCodeLensParticipant(ICodeLensParticipant codeLensParticipant) voidregisterCompletionParticipant(ICompletionParticipant completionParticipant) voidregisterComponent(Object component) voidregisterDefinitionParticipant(IDefinitionParticipant definitionParticipant) voidregisterDiagnosticsParticipant(IDiagnosticsParticipant diagnosticsParticipant) voidregisterDocumentColorParticipant(IDocumentColorParticipant documentColorParticipant) voidregisterDocumentLifecycleParticipant(IDocumentLifecycleParticipant documentLifecycleParticipant) Register a new document lifecycle participantvoidregisterDocumentLinkParticipant(IDocumentLinkParticipant documentLinkParticipant) voidregisterFormatterParticipant(IFormatterParticipant formatterParticipant) voidvoidregisterHighlightingParticipant(IHighlightingParticipant highlightingParticipant) voidregisterHoverParticipant(IHoverParticipant hoverParticipant) voidvoidregisterInlayHintParticipant(IInlayHintParticipant inlayHintParticipant) Register a new inlay hint participant.voidregisterInlineCompletionParticipant(IInlineCompletionParticipant inlineCompletionParticipant) Register a new inline completion participantvoidregisterLinkedEditingRangesParticipants(ILinkedEditingRangesParticipant linkedEditingRangesParticipant) voidregisterReferenceParticipant(IReferenceParticipant referenceParticipant) voidregisterRenameParticipant(IRenameParticipant renameParticipant) voidregisterSemanticTokensParticipant(ISemanticTokensParticipant semanticTokensParticipant) Register a new semantic tokens participant.voidregisterSymbolsProviderParticipant(ISymbolsProviderParticipant symbolsProviderParticipant) voidregisterTypeDefinitionParticipant(ITypeDefinitionParticipant typeDefinitionParticipant) voidregisterWorkspaceServiceParticipant(IWorkspaceServiceParticipant workspaceServiceParticipant) Register a new workspace service participantvoidsetCodeLensRefresher(Consumer<Predicate<String>> refresher) voidsetCommandService(IXMLCommandService commandService) Sets the LS command servicevoidsetDiagnosticsRefresher(Consumer<Predicate<DOMDocument>> refresher) voidsetDocumentProvider(IXMLDocumentProvider documentProvider) Set the XML Document providervoidsetNotificationService(IXMLNotificationService notificationService) Sets the notification servicevoidsetProgressSupport(ProgressSupport progressSupport) voidsetTelemetryManager(TelemetryManager telemetryManager) voidsetValidationService(IXMLValidationService validationService) Sets the XML document validation servicevoidunregisterCodeActionParticipant(ICodeActionParticipant codeActionsParticipant) voidunregisterCodeLensParticipant(ICodeLensParticipant codeLensParticipant) voidunregisterCompletionParticipant(ICompletionParticipant completionParticipant) voidunregisterDefinitionParticipant(IDefinitionParticipant definitionParticipant) voidunregisterDiagnosticsParticipant(IDiagnosticsParticipant diagnosticsParticipant) voidunregisterDocumentColorParticipant(IDocumentColorParticipant documentColorParticipant) voidunregisterDocumentLifecycleParticipant(IDocumentLifecycleParticipant documentLifecycleParticipant) Unregister a new document lifecycle participant.voidunregisterDocumentLinkParticipant(IDocumentLinkParticipant documentLinkParticipant) voidunregisterFormatterParticipant(IFormatterParticipant formatterParticipant) voidunregisterHighlightingParticipant(IHighlightingParticipant highlightingParticipant) voidunregisterHoverParticipant(IHoverParticipant hoverParticipant) voidunregisterInlayHintParticipant(IInlayHintParticipant inlayHintParticipant) Unregister an inlay hint participant.voidunregisterInlineCompletionParticipant(IInlineCompletionParticipant inlineCompletionParticipant) Unregister an inline completion participant.voidunregisterLinkedEditingRangesParticipants(ILinkedEditingRangesParticipant linkedEditingRangesParticipant) voidunregisterReferenceParticipant(IReferenceParticipant referenceParticipant) voidunregisterRenameParticipant(IRenameParticipant renameParticipant) voidunregisterSemanticTokensParticipant(ISemanticTokensParticipant semanticTokensParticipant) Unregister a semantic tokens participant.voidunregisterSymbolsProviderParticipant(ISymbolsProviderParticipant symbolsProviderParticipant) voidunregisterTypeDefinitionParticipant(ITypeDefinitionParticipant typeDefinitionParticipant) voidunregisterWorkspaceServiceParticipant(IWorkspaceServiceParticipant workspaceServiceParticipant) Unregister a new workspace service participant.
-
Constructor Details
-
XMLExtensionsRegistry
public XMLExtensionsRegistry()
-
-
Method Details
-
registerComponent
-
getComponent
Description copied from interface:IComponentProviderReturns the component class instance from the given class and null otherwise.- Specified by:
getComponentin interfaceIComponentProvider- Parameters:
clazz- class of the component.- Returns:
- the component class instance from the given class and null otherwise.
-
registerGrammarReferenceContributor
-
getGrammarReferenceContributors
-
registerIndexFileScannerContributor
-
getIndexFileScannerContributors
-
initializeParams
public void initializeParams(org.eclipse.lsp4j.InitializeParams params) -
doSave
-
notifyInitialized
public void notifyInitialized(org.eclipse.lsp4j.InitializedParams params) -
getExtensions
-
getCompletionParticipants
-
getHoverParticipants
-
getDiagnosticsParticipants
-
getCodeActionsParticipants
-
getDocumentLinkParticipants
-
getDocumentColorParticipants
-
getDefinitionParticipants
-
getTypeDefinitionParticipants
-
getReferenceParticipants
-
getCodeLensParticipants
-
getHighlightingParticipants
-
getRenameParticipants
-
getLinkedEditingRangesParticipants
-
getFormatterParticipants
-
getSymbolsProviderParticipants
-
getWorkspaceServiceParticipants
Return the registered workspace service participants.- Returns:
- the registered workspace service participants.
- Since:
- 0.14.2
-
getDocumentLifecycleParticipants
Return the registered document lifecycle participants.- Returns:
- the registered document lifecycle participants.
- Since:
- 0.18.0
-
getInlineCompletionParticipants
Return the registered inline completion participants.- Returns:
- the registered inline completion participants.
-
initializeIfNeeded
public void initializeIfNeeded() -
dispose
public void dispose()Unregisters all registered extensions. -
registerCompletionParticipant
-
unregisterCompletionParticipant
-
registerHoverParticipant
-
unregisterHoverParticipant
-
registerDiagnosticsParticipant
-
unregisterDiagnosticsParticipant
-
registerCodeActionParticipant
-
unregisterCodeActionParticipant
-
registerDocumentLinkParticipant
-
unregisterDocumentLinkParticipant
-
registerDocumentColorParticipant
-
unregisterDocumentColorParticipant
-
registerDefinitionParticipant
-
unregisterDefinitionParticipant
-
registerTypeDefinitionParticipant
-
unregisterTypeDefinitionParticipant
public void unregisterTypeDefinitionParticipant(ITypeDefinitionParticipant typeDefinitionParticipant) -
registerReferenceParticipant
-
unregisterReferenceParticipant
-
registerCodeLensParticipant
-
unregisterCodeLensParticipant
-
registerHighlightingParticipant
-
unregisterHighlightingParticipant
-
registerRenameParticipant
-
unregisterRenameParticipant
-
registerLinkedEditingRangesParticipants
public void registerLinkedEditingRangesParticipants(ILinkedEditingRangesParticipant linkedEditingRangesParticipant) -
unregisterLinkedEditingRangesParticipants
public void unregisterLinkedEditingRangesParticipants(ILinkedEditingRangesParticipant linkedEditingRangesParticipant) -
registerFormatterParticipant
-
unregisterFormatterParticipant
-
registerSymbolsProviderParticipant
public void registerSymbolsProviderParticipant(ISymbolsProviderParticipant symbolsProviderParticipant) -
unregisterSymbolsProviderParticipant
public void unregisterSymbolsProviderParticipant(ISymbolsProviderParticipant symbolsProviderParticipant) -
registerWorkspaceServiceParticipant
public void registerWorkspaceServiceParticipant(IWorkspaceServiceParticipant workspaceServiceParticipant) Register a new workspace service participant- Parameters:
workspaceServiceParticipant- the participant to register- Since:
- 0.14.2
-
unregisterWorkspaceServiceParticipant
public void unregisterWorkspaceServiceParticipant(IWorkspaceServiceParticipant workspaceServiceParticipant) Unregister a new workspace service participant.- Parameters:
workspaceServiceParticipant- the participant to unregister- Since:
- 0.14.2
-
registerDocumentLifecycleParticipant
public void registerDocumentLifecycleParticipant(IDocumentLifecycleParticipant documentLifecycleParticipant) Register a new document lifecycle participant- Parameters:
documentLifecycleParticipant- the participant to register- Since:
- 0.18.0
-
unregisterDocumentLifecycleParticipant
public void unregisterDocumentLifecycleParticipant(IDocumentLifecycleParticipant documentLifecycleParticipant) Unregister a new document lifecycle participant.- Parameters:
documentLifecycleParticipant- the participant to unregister- Since:
- 0.18.0
-
registerInlineCompletionParticipant
public void registerInlineCompletionParticipant(IInlineCompletionParticipant inlineCompletionParticipant) Register a new inline completion participant- Parameters:
inlineCompletionParticipant- the participant to register
-
unregisterInlineCompletionParticipant
public void unregisterInlineCompletionParticipant(IInlineCompletionParticipant inlineCompletionParticipant) Unregister an inline completion participant.- Parameters:
inlineCompletionParticipant- the participant to unregister
-
getSemanticTokensParticipants
Return the registered semantic tokens participants.- Returns:
- the registered semantic tokens participants.
-
registerSemanticTokensParticipant
Register a new semantic tokens participant.- Parameters:
semanticTokensParticipant- the participant to register.
-
unregisterSemanticTokensParticipant
public void unregisterSemanticTokensParticipant(ISemanticTokensParticipant semanticTokensParticipant) Unregister a semantic tokens participant.- Parameters:
semanticTokensParticipant- the participant to unregister.
-
getInlayHintParticipants
Return the registered inlay hint participants.- Returns:
- the registered inlay hint participants.
-
registerInlayHintParticipant
Register a new inlay hint participant.- Parameters:
inlayHintParticipant- the participant to register.
-
unregisterInlayHintParticipant
Unregister an inlay hint participant.- Parameters:
inlayHintParticipant- the participant to unregister.
-
getDocumentProvider
Returns the XML Document provider and null otherwise.- Returns:
- the XML Document provider and null otherwise.
-
setDocumentProvider
Set the XML Document provider- Parameters:
documentProvider- XML Document provider
-
getResolverExtensionManager
-
getNotificationService
Returns the notification service- Returns:
- the notification service
-
setNotificationService
Sets the notification service- Parameters:
notificationService- the new notification service
-
getValidationService
Returns the XML document validation service- Returns:
- the validation service
-
setValidationService
Sets the XML document validation service- Parameters:
validationService-
-
getCommandService
Returns the LS command service- Returns:
- the command service
-
setCommandService
Sets the LS command service- Parameters:
commandService-
-
getTelemetryManager
-
setTelemetryManager
-
setProgressSupport
-
getProgressSupport
-
setCodeLensRefresher
-
setDiagnosticsRefresher
-
refreshDiagnostics
Triggers a diagnostics re-publish for all open documents accepted bydocumentFilter. Extensions that need to push updated diagnostics after an asynchronous event (e.g. workspace index scan completed) call this instead of hard-coding document iteration.This is the async counterpart of
IDiagnosticsRefresher.refreshDiagnostics(java.util.function.Predicate<org.eclipse.lemminx.dom.DOMDocument>).- Specified by:
refreshDiagnosticsin interfaceIDiagnosticsRefresher- Parameters:
documentFilter- predicate applied to each openDOMDocument.
-
refreshCodeLenses
public void refreshCodeLenses()Requests a code-lens refresh for all open documents. -
refreshCodeLenses
Requests a code-lens refresh, but only if at least one open document has a URI accepted byuriFilter. Callers that know which document types their lenses affect should pass a precise filter to avoid unnecessary client notifications when no relevant documents are open.
-