use of org.eclipse.lsp4j.Registration in project sts4 by spring-projects.
the class SimpleLanguageServer method initialized.
@Override
public void initialized() {
async.withLog(log, () -> {
Registration registration = new Registration(WORKSPACE_FOLDERS_CAPABILITY_ID, WORKSPACE_FOLDERS_CAPABILITY_NAME, null);
RegistrationParams registrationParams = new RegistrationParams(Collections.singletonList(registration));
getClient().registerCapability(registrationParams);
// triggers onInitialized handlers.
this.initialized.complete(null);
});
}
use of org.eclipse.lsp4j.Registration in project sts4 by spring-projects.
the class SimpleServerFileObserver method subscribe.
private void subscribe(String subscriptionId, List<String> globPattern, int kind) {
if (server.canRegisterFileWatchersDynamically()) {
List<FileSystemWatcher> watchers = globPattern.stream().map(pattern -> new FileSystemWatcher(pattern, kind)).collect(Collectors.toList());
Registration registration = new Registration(subscriptionId, WORKSPACE_DID_CHANGE_WATCHED_FILES, new DidChangeWatchedFilesRegistrationOptions(watchers));
server.getClient().registerCapability(new RegistrationParams(Arrays.asList(registration)));
}
}
Aggregations