mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-27 10:37:38 +01:00
chore - inline single-use function
This commit is contained in:
@@ -14,7 +14,14 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
|
||||
import { showExtensionQuery } from 'vs/workbench/contrib/format/browser/showExtensionQuery';
|
||||
import { VIEWLET_ID, IExtensionsViewPaneContainer } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
|
||||
async function showExtensionQuery(viewletService: IViewletService, query: string) {
|
||||
const viewlet = await viewletService.openViewlet(VIEWLET_ID, true);
|
||||
if (viewlet) {
|
||||
(viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer).search(query);
|
||||
}
|
||||
}
|
||||
|
||||
registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { VIEWLET_ID, IExtensionsViewPaneContainer } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
|
||||
export function showExtensionQuery(viewletService: IViewletService, query: string) {
|
||||
return viewletService.openViewlet(VIEWLET_ID, true).then(viewlet => {
|
||||
if (viewlet) {
|
||||
(viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer).search(query);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user