use of org.eclipse.lsp4j.WorkspaceFoldersChangeEvent in project sts4 by spring-projects.
the class SimpleWorkspaceService method didChangeWorkspaceFolders.
@Override
public synchronized void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params) {
WorkspaceFoldersChangeEvent evt = params.getEvent();
boolean changed = false;
for (WorkspaceFolder r : evt.getAdded()) {
workspaceRoots.add(r);
changed = true;
}
for (WorkspaceFolder r : evt.getRemoved()) {
workspaceRoots.remove(r);
changed = true;
}
if (changed) {
workspaceFolderListeners.fire(params);
}
}
Aggregations