Package org.eclipse.lemminx
Class XMLLanguageServer
- java.lang.Object
-
- org.eclipse.lemminx.XMLLanguageServer
-
- All Implemented Interfaces:
ParentProcessWatcher.ProcessLanguageServer,ProgressSupport,XMLLanguageServerAPI,IXMLDocumentProvider,IXMLNotificationService,IXMLValidationService,org.eclipse.lsp4j.services.LanguageServer
public class XMLLanguageServer extends Object implements ParentProcessWatcher.ProcessLanguageServer, XMLLanguageServerAPI, IXMLDocumentProvider, IXMLNotificationService, IXMLValidationService, ProgressSupport
XML language server.
-
-
Constructor Summary
Constructors Constructor Description XMLLanguageServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<AutoCloseTagResponse>closeTag(org.eclipse.lsp4j.TextDocumentPositionParams params)CompletableFuture<Void>createProgress(org.eclipse.lsp4j.WorkDoneProgressCreateParams params)Create a progress.voidexit()voidexit(int exitCode)Collection<DOMDocument>getAllDocuments()All known documents XML server is working with at the momentXMLCapabilityManagergetCapabilityManager()DOMDocumentgetDocument(String uri)Returns theDOMDocumentinstance from the givenuriand null otherwise.XMLLanguageClientAPIgetLanguageClient()longgetParentProcessId()SharedSettingsgetSharedSettings()Returns the current SharedSettings instanceTelemetryManagergetTelemetryManager()Returns the telemetry manager.org.eclipse.lsp4j.services.TextDocumentServicegetTextDocumentService()org.eclipse.lsp4j.services.WorkspaceServicegetWorkspaceService()XMLLanguageServicegetXMLLanguageService()CompletableFuture<org.eclipse.lsp4j.InitializeResult>initialize(org.eclipse.lsp4j.InitializeParams params)voidinitialized(org.eclipse.lsp4j.InitializedParams params)booleanisWorkDoneProgressSupported()Returns true if the LSP client can support LSP progress and false otherwise.CompletableFuture<org.eclipse.lsp4j.Position>matchingTagPosition(org.eclipse.lsp4j.TextDocumentPositionParams params)voidnotifyProgress(String progressId, org.eclipse.lsp4j.WorkDoneProgressNotification notification)Notify the the progress notification with the given process id.ScheduledFuture<?>schedule(Runnable command, int delay, TimeUnit unit)voidsendNotification(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands)Sends a notification to the client with the providedmessageIf the client supports actionable notifications, the providedcommandswill be provided alongside the notification SeeActionableNotificationandXMLLanguageClientAPI.actionableNotification(org.eclipse.lemminx.customservice.ActionableNotification)voidsetClient(org.eclipse.lsp4j.services.LanguageClient languageClient)voidsetTrace(org.eclipse.lsp4j.SetTraceParams params)CompletableFuture<Object>shutdown()voidupdateSettings(Object initOptions)Update XML settings configured from the client.voidvalidate(DOMDocument document, Map<String,Object> validationArgs)Performs XML document validation-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.lemminx.services.IXMLValidationService
validate
-
Methods inherited from interface org.eclipse.lsp4j.services.LanguageServer
cancelProgress, getNotebookDocumentService, initialized
-
Methods inherited from interface org.eclipse.lemminx.commons.progress.ProgressSupport
createProgressMonitor, createProgressMonitor
-
-
-
-
Method Detail
-
initialize
public CompletableFuture<org.eclipse.lsp4j.InitializeResult> initialize(org.eclipse.lsp4j.InitializeParams params)
- Specified by:
initializein interfaceorg.eclipse.lsp4j.services.LanguageServer
-
initialized
public void initialized(org.eclipse.lsp4j.InitializedParams params)
- Specified by:
initializedin interfaceorg.eclipse.lsp4j.services.LanguageServer
-
updateSettings
public void updateSettings(Object initOptions)
Update XML settings configured from the client.- Parameters:
initOptions- the XML settings
-
shutdown
public CompletableFuture<Object> shutdown()
- Specified by:
shutdownin interfaceorg.eclipse.lsp4j.services.LanguageServer
-
exit
public void exit()
- Specified by:
exitin interfaceorg.eclipse.lsp4j.services.LanguageServer
-
exit
public void exit(int exitCode)
- Specified by:
exitin interfaceParentProcessWatcher.ProcessLanguageServer
-
getTextDocumentService
public org.eclipse.lsp4j.services.TextDocumentService getTextDocumentService()
- Specified by:
getTextDocumentServicein interfaceorg.eclipse.lsp4j.services.LanguageServer
-
getWorkspaceService
public org.eclipse.lsp4j.services.WorkspaceService getWorkspaceService()
- Specified by:
getWorkspaceServicein interfaceorg.eclipse.lsp4j.services.LanguageServer
-
setClient
public void setClient(org.eclipse.lsp4j.services.LanguageClient languageClient)
-
getLanguageClient
public XMLLanguageClientAPI getLanguageClient()
-
getXMLLanguageService
public XMLLanguageService getXMLLanguageService()
-
schedule
public ScheduledFuture<?> schedule(Runnable command, int delay, TimeUnit unit)
-
getParentProcessId
public long getParentProcessId()
- Specified by:
getParentProcessIdin interfaceParentProcessWatcher.ProcessLanguageServer
-
closeTag
public CompletableFuture<AutoCloseTagResponse> closeTag(org.eclipse.lsp4j.TextDocumentPositionParams params)
- Specified by:
closeTagin interfaceXMLLanguageServerAPI
-
matchingTagPosition
public CompletableFuture<org.eclipse.lsp4j.Position> matchingTagPosition(org.eclipse.lsp4j.TextDocumentPositionParams params)
- Specified by:
matchingTagPositionin interfaceXMLLanguageServerAPI
-
getDocument
public DOMDocument getDocument(String uri)
Description copied from interface:IXMLDocumentProviderReturns theDOMDocumentinstance from the givenuriand null otherwise.- Specified by:
getDocumentin interfaceIXMLDocumentProvider- Parameters:
uri- the document URI.- Returns:
- the
DOMDocumentinstance from the givenuriand null otherwise.
-
sendNotification
public void sendNotification(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands)
Description copied from interface:IXMLNotificationServiceSends a notification to the client with the providedmessageIf the client supports actionable notifications, the providedcommandswill be provided alongside the notification SeeActionableNotificationandXMLLanguageClientAPI.actionableNotification(org.eclipse.lemminx.customservice.ActionableNotification)- Specified by:
sendNotificationin interfaceIXMLNotificationService- Parameters:
message- the message to sendmessageType- the message typecommands- the commands to send alongside the notification
-
getSharedSettings
public SharedSettings getSharedSettings()
Description copied from interface:IXMLNotificationServiceReturns the current SharedSettings instance- Specified by:
getSharedSettingsin interfaceIXMLNotificationService- Returns:
- the current SharedSettings instance
-
getAllDocuments
public Collection<DOMDocument> getAllDocuments()
Description copied from interface:IXMLDocumentProviderAll known documents XML server is working with at the moment- Specified by:
getAllDocumentsin interfaceIXMLDocumentProvider- Returns:
- XML documents
-
validate
public void validate(DOMDocument document, Map<String,Object> validationArgs)
Description copied from interface:IXMLValidationServicePerforms XML document validation- Specified by:
validatein interfaceIXMLValidationService- Parameters:
document- the XML documentvalidationArgs- validation arguments.
-
getCapabilityManager
public XMLCapabilityManager getCapabilityManager()
-
getTelemetryManager
public TelemetryManager getTelemetryManager()
Returns the telemetry manager.- Returns:
- the telemetry manager.
-
setTrace
public void setTrace(org.eclipse.lsp4j.SetTraceParams params)
- Specified by:
setTracein interfaceorg.eclipse.lsp4j.services.LanguageServer
-
isWorkDoneProgressSupported
public boolean isWorkDoneProgressSupported()
Description copied from interface:ProgressSupportReturns true if the LSP client can support LSP progress and false otherwise.- Specified by:
isWorkDoneProgressSupportedin interfaceProgressSupport- Returns:
- true if the LSP client can support LSP progress and false otherwise.
-
createProgress
public CompletableFuture<Void> createProgress(org.eclipse.lsp4j.WorkDoneProgressCreateParams params)
Description copied from interface:ProgressSupportCreate a progress.- Specified by:
createProgressin interfaceProgressSupport- Parameters:
params- the progress create parameters- Returns:
-
notifyProgress
public void notifyProgress(String progressId, org.eclipse.lsp4j.WorkDoneProgressNotification notification)
Description copied from interface:ProgressSupportNotify the the progress notification with the given process id.- Specified by:
notifyProgressin interfaceProgressSupport- Parameters:
progressId- the progress id.notification- the progress notification.
-
-