use of org.springframework.ide.vscode.commons.languageserver.json.FileSystemWatcher 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