Skip to content

Commit

Permalink
Revert "language-server: make some notifications concurrent too, for …
Browse files Browse the repository at this point in the history
…faster workspace initialization"

This reverts commit 384921c.
  • Loading branch information
joshtynjala committed Jul 14, 2023
1 parent f735f33 commit 321408f
Showing 1 changed file with 0 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -830,16 +830,6 @@ public CompletableFuture<Object> executeCommand(ExecuteCommandParams params) {
*/
@Override
public void didOpen(DidOpenTextDocumentParams params) {
if (!concurrentRequests) {
didOpen2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didOpen2(params);
});
}

private void didOpen2(DidOpenTextDocumentParams params) {
TextDocumentItem textDocument = params.getTextDocument();
String textDocumentUri = textDocument.getUri();
if (!textDocumentUri.endsWith(FILE_EXTENSION_AS) && !textDocumentUri.endsWith(FILE_EXTENSION_MXML)) {
Expand Down Expand Up @@ -896,16 +886,6 @@ private void didOpen2(DidOpenTextDocumentParams params) {
*/
@Override
public void didChange(DidChangeTextDocumentParams params) {
if (!concurrentRequests) {
didChange2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didChange2(params);
});
}

private void didChange2(DidChangeTextDocumentParams params) {
VersionedTextDocumentIdentifier textDocument = params.getTextDocument();
String textDocumentUri = textDocument.getUri();
if (!textDocumentUri.endsWith(FILE_EXTENSION_AS) && !textDocumentUri.endsWith(FILE_EXTENSION_MXML)) {
Expand Down Expand Up @@ -995,16 +975,6 @@ private void didChange2(DidChangeTextDocumentParams params) {
*/
@Override
public void didClose(DidCloseTextDocumentParams params) {
if (!concurrentRequests) {
didClose2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didClose2(params);
});
}

private void didClose2(DidCloseTextDocumentParams params) {
TextDocumentIdentifier textDocument = params.getTextDocument();
String textDocumentUri = textDocument.getUri();
if (!textDocumentUri.endsWith(FILE_EXTENSION_AS) && !textDocumentUri.endsWith(FILE_EXTENSION_MXML)) {
Expand Down Expand Up @@ -1071,16 +1041,6 @@ private void didClose2(DidCloseTextDocumentParams params) {
*/
@Override
public void didSave(DidSaveTextDocumentParams params) {
if (!concurrentRequests) {
didSave2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didSave2(params);
});
}

private void didSave2(DidSaveTextDocumentParams params) {
if (realTimeProblems) {
// as long as we're checking on change, we shouldn't need to do
// anything on save because we should already have the correct state
Expand Down Expand Up @@ -1125,16 +1085,6 @@ private void didSave2(DidSaveTextDocumentParams params) {
* project.
*/
public void didChangeWatchedFiles(DidChangeWatchedFilesParams params) {
if (!concurrentRequests) {
didChangeWatchedFiles2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didChangeWatchedFiles2(params);
});
}

private void didChangeWatchedFiles2(DidChangeWatchedFilesParams params) {
Set<ActionScriptProjectData> foldersToCheck = new HashSet<>();

for (FileEvent event : params.getChanges()) {
Expand Down Expand Up @@ -1287,16 +1237,6 @@ public FileVisitResult visitFile(Path subPath, BasicFileAttributes attrs) {

@Override
public void didChangeConfiguration(DidChangeConfigurationParams params) {
if (!concurrentRequests) {
didChangeConfiguration2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didChangeConfiguration2(params);
});
}

private void didChangeConfiguration2(DidChangeConfigurationParams params) {
if (!(params.getSettings() instanceof JsonObject)) {
return;
}
Expand Down Expand Up @@ -1331,16 +1271,6 @@ private void didChangeConfiguration2(DidChangeConfigurationParams params) {

@Override
public void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params) {
if (!concurrentRequests) {
didChangeWorkspaceFolders2(params);
return;
}
compilerWorkspace.getExecutorService().submit(() -> {
didChangeWorkspaceFolders2(params);
});
}

private void didChangeWorkspaceFolders2(DidChangeWorkspaceFoldersParams params) {
for (WorkspaceFolder folder : params.getEvent().getRemoved()) {
removeWorkspaceFolder(folder);
}
Expand Down

0 comments on commit 321408f

Please sign in to comment.