mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-29 16:20:29 -04:00
Merge from vscode 9bc92b48d945144abb405b9e8df05e18accb9148
This commit is contained in:
@@ -14,7 +14,7 @@ import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } fro
|
||||
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/services/output/common/output';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
import { VIEWLET_ID, IExtensionsWorkbenchService, IExtensionsViewPaneContainer } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
|
||||
import {
|
||||
OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction,
|
||||
@@ -47,6 +47,7 @@ import { IViewContainersRegistry, ViewContainerLocation, Extensions as ViewConta
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
|
||||
// Singletons
|
||||
registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);
|
||||
@@ -298,6 +299,30 @@ CommandsRegistry.registerCommand({
|
||||
}
|
||||
});
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: 'workbench.extensions.search',
|
||||
description: {
|
||||
description: localize('workbench.extensions.search.description', "Search for a specific extension"),
|
||||
args: [
|
||||
{
|
||||
name: localize('workbench.extensions.search.arg.name', "Query to use in search"),
|
||||
schema: { 'type': 'string' }
|
||||
}
|
||||
]
|
||||
},
|
||||
handler: async (accessor, query: string = '') => {
|
||||
const viewletService = accessor.get(IViewletService);
|
||||
const viewlet = await viewletService.openViewlet(VIEWLET_ID, true);
|
||||
|
||||
if (!viewlet) {
|
||||
return;
|
||||
}
|
||||
|
||||
(viewlet.getViewPaneContainer() as IExtensionsViewPaneContainer).search(query);
|
||||
viewlet.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// File menu registration
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
|
||||
@@ -13,6 +13,11 @@ export class ExtensionsInput extends EditorInput {
|
||||
static readonly ID = 'workbench.extensions.input2';
|
||||
get extension(): IExtension { return this._extension; }
|
||||
|
||||
readonly resource = URI.from({
|
||||
scheme: 'extension',
|
||||
path: this.extension.identifier.id
|
||||
});
|
||||
|
||||
constructor(
|
||||
private _extension: IExtension,
|
||||
) {
|
||||
@@ -49,11 +54,4 @@ export class ExtensionsInput extends EditorInput {
|
||||
supportsSplitEditor(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
getResource(): URI {
|
||||
return URI.from({
|
||||
scheme: 'extension',
|
||||
path: this.extension.identifier.id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@ export class RuntimeExtensionsInput extends EditorInput {
|
||||
|
||||
static readonly ID = 'workbench.runtimeExtensions.input';
|
||||
|
||||
readonly resource = URI.from({
|
||||
scheme: 'runtime-extensions',
|
||||
path: 'default'
|
||||
});
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
@@ -37,11 +42,4 @@ export class RuntimeExtensionsInput extends EditorInput {
|
||||
supportsSplitEditor(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
getResource(): URI {
|
||||
return URI.from({
|
||||
scheme: 'runtime-extensions',
|
||||
path: 'default'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user