Skip to content

Commit

Permalink
Merge pull request apache#7730 from sdedic/vscode/save-just-locals
Browse files Browse the repository at this point in the history
Save just documents that are local files reachable by NBLS
  • Loading branch information
sdedic authored Sep 13, 2024
2 parents 7bdf651 + a4c31f1 commit 06a2d99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion java/java.lsp.server/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ function wrapCommandWithProgress(lsCommand : string, title : string, log? : vsco
return window.withProgress({ location: ProgressLocation.Window }, p => {
return new Promise(async (resolve, reject) => {
let c : LanguageClient = await client;
await vscode.commands.executeCommand('workbench.action.files.saveAll');
const docsTosave : Thenable<boolean>[]= vscode.workspace.textDocuments.
filter(d => fs.existsSync(d.uri.fsPath)).
map(d => d.save());
await Promise.all(docsTosave);
const commands = await vscode.commands.getCommands();
if (commands.includes(lsCommand)) {
p.report({ message: title });
Expand Down

0 comments on commit 06a2d99

Please sign in to comment.