Merge from vscode 8c426f9f3b6b18935cc6c2ec8aa6d45ccd88021e

This commit is contained in:
ADS Merger
2020-07-23 02:21:09 +00:00
parent efc8182954
commit ede827ee82
83 changed files with 1736 additions and 829 deletions

View File

@@ -1775,6 +1775,29 @@ export class ShowPopularExtensionsAction extends Action {
}
}
export class RecentlyPublishedExtensionsAction extends Action {
static readonly ID = 'workbench.extensions.action.recentlyPublishedExtensions';
static readonly LABEL = localize('recentlyPublishedExtensions', "Recently Published Extensions");
constructor(
id: string,
label: string,
@IViewletService private readonly viewletService: IViewletService
) {
super(id, label, undefined, true);
}
run(): Promise<void> {
return this.viewletService.openViewlet(VIEWLET_ID, true)
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
.then(viewlet => {
viewlet.search('@sort:publishedDate ');
viewlet.focus();
});
}
}
export class ShowRecommendedExtensionsAction extends Action {
static readonly ID = 'workbench.extensions.action.showRecommendedExtensions';
@@ -2050,6 +2073,27 @@ export class ShowAzureExtensionsAction extends Action {
}
}
export class SearchCategoryAction extends Action {
constructor(
id: string,
label: string,
private readonly category: string,
@IViewletService private readonly viewletService: IViewletService
) {
super(id, label, undefined, true);
}
run(): Promise<void> {
return this.viewletService.openViewlet(VIEWLET_ID, true)
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
.then(viewlet => {
viewlet.search(`@category:"${this.category.toLowerCase()}"`);
viewlet.focus();
});
}
}
export class ChangeSortAction extends Action {
private query: Query;