mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 08:40:29 -04:00
Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb
This commit is contained in:
@@ -60,6 +60,7 @@ import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { IFileDialogService, IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IProgressService, ProgressLocation } from 'vs/platform/progress/common/progress';
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { IViewsService } from 'vs/workbench/common/views';
|
||||
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; // {{SQL CARBON EDIT}}
|
||||
import product from 'vs/platform/product/common/product';
|
||||
@@ -1662,19 +1663,39 @@ export class ShowDisabledExtensionsAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class ClearExtensionsInputAction extends Action {
|
||||
export class ClearExtensionsSearchResultsAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.clearExtensionsInput';
|
||||
static readonly LABEL = localize('clearExtensionsInput', "Clear Extensions Search Results");
|
||||
static readonly ID = 'workbench.extensions.action.clearExtensionsSearchResults';
|
||||
static readonly LABEL = localize('clearExtensionsSearchResults', "Clear Extensions Search Results");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IViewsService private readonly viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'codicon-clear-all', true);
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
const viewPaneContainer = this.viewsService.getActiveViewPaneContainerWithId(VIEWLET_ID);
|
||||
if (viewPaneContainer) {
|
||||
const extensionsViewPaneContainer = viewPaneContainer as IExtensionsViewPaneContainer;
|
||||
extensionsViewPaneContainer.search('');
|
||||
extensionsViewPaneContainer.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class ClearExtensionsInputAction extends ClearExtensionsSearchResultsAction {
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
onSearchChange: Event<string>,
|
||||
value: string,
|
||||
@IViewletService private readonly viewletService: IViewletService
|
||||
@IViewsService viewsService: IViewsService
|
||||
) {
|
||||
super(id, label, 'codicon-clear-all', true);
|
||||
super(id, label, viewsService);
|
||||
this.onSearchChange(value);
|
||||
this._register(onSearchChange(this.onSearchChange, this));
|
||||
}
|
||||
@@ -1683,14 +1704,6 @@ export class ClearExtensionsInputAction extends Action {
|
||||
this.enabled = !!value;
|
||||
}
|
||||
|
||||
run(): Promise<void> {
|
||||
return this.viewletService.openViewlet(VIEWLET_ID, true)
|
||||
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
|
||||
.then(viewlet => {
|
||||
viewlet.search('');
|
||||
viewlet.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class ShowBuiltInExtensionsAction extends Action {
|
||||
|
||||
Reference in New Issue
Block a user