Skip to content

Commit df82f2a

Browse files
authored
fix: Show proper progress title and location when creating project (#1167)
1 parent 058fe3e commit df82f2a

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

extension/src/client/GradleClient.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,16 @@ export class GradleClient implements vscode.Disposable {
277277
javaDebugPort = 0,
278278
task?: vscode.Task,
279279
onOutput?: (output: Output) => void,
280-
showOutputColors = true
280+
showOutputColors = true,
281+
title?: string,
282+
location?: vscode.ProgressLocation
281283
): Promise<void> {
282284
await this.waitForConnect();
283285
this.statusBarItem.hide();
284286
return vscode.window.withProgress(
285287
{
286-
location: vscode.ProgressLocation.Window,
287-
title: "Gradle",
288+
location: location || vscode.ProgressLocation.Window,
289+
title: title || "Gradle",
288290
cancellable: true,
289291
},
290292
async (progress: vscode.Progress<{ message?: string }>, token: vscode.CancellationToken) => {

extension/src/commands/CreateProjectCommand.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ export class CreateProjectCommand extends Command {
102102
args.push("--package");
103103
args.push(metadata.sourcePackageName);
104104
}
105-
await this.client.runBuild(metadata.targetFolder, cancellationKey, args);
105+
await this.client.runBuild(
106+
metadata.targetFolder,
107+
cancellationKey,
108+
args,
109+
"",
110+
0,
111+
undefined,
112+
undefined,
113+
true,
114+
"Create Gradle project",
115+
vscode.ProgressLocation.Notification
116+
);
106117
}
107118
}

0 commit comments

Comments
 (0)