Skip to content

Commit

Permalink
fix: Show proper progress title and location when creating project (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
CsCherrYY authored Jan 25, 2022
1 parent 058fe3e commit df82f2a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 5 additions & 3 deletions extension/src/client/GradleClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,16 @@ export class GradleClient implements vscode.Disposable {
javaDebugPort = 0,
task?: vscode.Task,
onOutput?: (output: Output) => void,
showOutputColors = true
showOutputColors = true,
title?: string,
location?: vscode.ProgressLocation
): Promise<void> {
await this.waitForConnect();
this.statusBarItem.hide();
return vscode.window.withProgress(
{
location: vscode.ProgressLocation.Window,
title: "Gradle",
location: location || vscode.ProgressLocation.Window,
title: title || "Gradle",
cancellable: true,
},
async (progress: vscode.Progress<{ message?: string }>, token: vscode.CancellationToken) => {
Expand Down
13 changes: 12 additions & 1 deletion extension/src/commands/CreateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ export class CreateProjectCommand extends Command {
args.push("--package");
args.push(metadata.sourcePackageName);
}
await this.client.runBuild(metadata.targetFolder, cancellationKey, args);
await this.client.runBuild(
metadata.targetFolder,
cancellationKey,
args,
"",
0,
undefined,
undefined,
true,
"Create Gradle project",
vscode.ProgressLocation.Notification
);
}
}

0 comments on commit df82f2a

Please sign in to comment.