org.eclipse.lsp4j.DocumentHighlightParams Java Examples
The following examples show how to use
org.eclipse.lsp4j.DocumentHighlightParams.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LanguageServerImpl.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * Compute the document highlights. Executed in a read request. * @since 2.20 */ protected List<? extends DocumentHighlight> documentHighlight(DocumentHighlightParams params, CancelIndicator cancelIndicator) { URI uri = getURI(params); IDocumentHighlightService service = getService(uri, IDocumentHighlightService.class); if (service == null) { return Collections.emptyList(); } return workspaceManager.doRead(uri, (doc, resource) -> service.getDocumentHighlights(doc, resource, params, cancelIndicator)); }
Example #2
Source File: XMLTextDocumentService.java From lemminx with Eclipse Public License 2.0 | 4 votes |
@Override public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) { return computeDOMAsync(params.getTextDocument(), (cancelChecker, xmlDocument) -> { return getXMLLanguageService().findDocumentHighlights(xmlDocument, params.getPosition(), cancelChecker); }); }
Example #3
Source File: CamelTextDocumentService.java From camel-language-server with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams position) { LOGGER.info("documentHighlight: {}", position.getTextDocument()); return CompletableFuture.completedFuture(Collections.emptyList()); }
Example #4
Source File: JDTLanguageServer.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 4 votes |
@Override public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams position) { logInfo(">> document/documentHighlight"); DocumentHighlightHandler handler = new DocumentHighlightHandler(); return computeAsync((monitor) -> handler.documentHighlight(position, monitor)); }
Example #5
Source File: ActionScriptServices.java From vscode-as3mxml with Apache License 2.0 | 4 votes |
/** * This feature is not implemented at this time. */ @Override public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) { return CompletableFuture.completedFuture(Collections.emptyList()); }
Example #6
Source File: LanguageServerImpl.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) { return requestManager.runRead((cancelIndicator) -> documentHighlight(params, cancelIndicator)); }
Example #7
Source File: DefaultDocumentHighlightService.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public List<? extends DocumentHighlight> getDocumentHighlights(Document document, XtextResource resource, DocumentHighlightParams params, CancelIndicator cancelIndicator) { int offset = document.getOffSet(params.getPosition()); return getDocumentHighlights(resource, offset); }
Example #8
Source File: IDocumentHighlightService.java From xtext-core with Eclipse Public License 2.0 | 2 votes |
/** * @since 2.21 */ List<? extends DocumentHighlight> getDocumentHighlights(Document document, XtextResource resource, DocumentHighlightParams params, CancelIndicator cancelIndicator);
Example #9
Source File: TextDocumentService.java From lsp4j with Eclipse Public License 2.0 | 2 votes |
/** * The document highlight request is sent from the client to the server to * to resolve a document highlights for a given text document position. * * Registration Options: TextDocumentRegistrationOptions */ @JsonRequest default CompletableFuture<List<? extends DocumentHighlight>> documentHighlight(DocumentHighlightParams params) { throw new UnsupportedOperationException(); }