Skip to content

Commit fe252bc

Browse files
committed
remove notification
1 parent 5e0e4b0 commit fe252bc

2 files changed

Lines changed: 2 additions & 38 deletions

File tree

extension/src/Extension.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ export class Extension {
9090
context,
9191
serverLogger
9292
);
93-
this.client = new GradleClient(
94-
this.server,
95-
statusBarItem,
96-
clientLogger,
97-
context
98-
);
93+
this.client = new GradleClient(this.server, statusBarItem, clientLogger);
9994
this.pinnedTasksStore = new PinnedTasksStore(context);
10095
this.recentTasksStore = new RecentTasksStore();
10196
this.taskTerminalsStore = new TaskTerminalsStore();

extension/src/client/GradleClient.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ export class GradleClient implements vscode.Disposable {
7171
public constructor(
7272
private readonly server: GradleServer,
7373
private readonly statusBarItem: vscode.StatusBarItem,
74-
private readonly clientLogger: Logger,
75-
private readonly context: vscode.ExtensionContext
74+
private readonly clientLogger: Logger
7675
) {
7776
this.server.onDidStart(this.handleServerStart);
7877
this.server.onDidStop(this.handleServerStop);
@@ -248,36 +247,6 @@ export class GradleClient implements vscode.Disposable {
248247
this.statusBarItem.command = COMMAND_SHOW_LOGS;
249248
this.statusBarItem.text = '$(warning) Gradle: Build Error';
250249
this.statusBarItem.show();
251-
const neverShow:
252-
| boolean
253-
| undefined = this.context.globalState.get<boolean>(
254-
'gradle.neverShowErrorNotification'
255-
);
256-
if (neverShow) {
257-
return;
258-
}
259-
const showOptions = [
260-
'View projects',
261-
'See errors',
262-
`Don't show again`,
263-
];
264-
void vscode.window
265-
.showErrorMessage(
266-
'Gradle configure failed. Default tasks and dependencies are showed in Gradle Projects view.',
267-
...showOptions
268-
)
269-
.then((choice) => {
270-
if (choice === 'View projects') {
271-
void vscode.commands.executeCommand('gradleTasksView.focus');
272-
} else if (choice === 'See errors') {
273-
void vscode.commands.executeCommand(COMMAND_SHOW_LOGS);
274-
} else if (choice === `Don't show again`) {
275-
void this.context.globalState.update(
276-
'gradle.neverShowErrorNotification',
277-
true
278-
);
279-
}
280-
});
281250
} finally {
282251
process.nextTick(() =>
283252
vscode.commands.executeCommand(COMMAND_REFRESH_DAEMON_STATUS)

0 commit comments

Comments
 (0)