Mark progress bars as cancellable where it appears we are respecting the token
This commit is contained in:
@@ -673,6 +673,7 @@ export class DatabaseUI extends DisposableObject {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Clearing cache",
|
title: "Clearing cache",
|
||||||
|
cancellable: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -692,6 +693,7 @@ export class DatabaseUI extends DisposableObject {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Trimming cache",
|
title: "Trimming cache",
|
||||||
|
cancellable: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ function getCommands(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Restarting Query Server",
|
title: "Restarting Query Server",
|
||||||
|
cancellable: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -810,7 +810,8 @@ export class ModelEditorView extends AbstractWebview<
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async modelDependency(): Promise<void> {
|
private async modelDependency(): Promise<void> {
|
||||||
return withProgress(async (progress, token) => {
|
return withProgress(
|
||||||
|
async (progress, token) => {
|
||||||
const addedDatabase =
|
const addedDatabase =
|
||||||
await this.promptChooseNewOrExistingDatabase(progress);
|
await this.promptChooseNewOrExistingDatabase(progress);
|
||||||
if (!addedDatabase || token.isCancellationRequested) {
|
if (!addedDatabase || token.isCancellationRequested) {
|
||||||
@@ -860,7 +861,9 @@ export class ModelEditorView extends AbstractWebview<
|
|||||||
Mode.Framework,
|
Mode.Framework,
|
||||||
);
|
);
|
||||||
await view.openView();
|
await view.openView();
|
||||||
});
|
},
|
||||||
|
{ cancellable: true },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async promptChooseNewOrExistingDatabase(
|
private async promptChooseNewOrExistingDatabase(
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ export class QueryServerClient extends DisposableObject {
|
|||||||
this.restartQueryServerInternal(progress, token),
|
this.restartQueryServerInternal(progress, token),
|
||||||
{
|
{
|
||||||
title: "Restarting CodeQL query server due to unexpected termination",
|
title: "Restarting CodeQL query server due to unexpected termination",
|
||||||
|
cancellable: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user