mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)
* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 * update distro * fix layering * update distro * fix tests
This commit is contained in:
@@ -35,12 +35,12 @@ export class ConnectionViewletPanel extends ViewPane {
|
||||
private options: IViewletViewOptions,
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IContextMenuService contextMenuService: IContextMenuService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IObjectExplorerService private readonly objectExplorerService: IObjectExplorerService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService, contextKeyService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
|
||||
this._addServerAction = this.instantiationService.createInstance(AddServerAction,
|
||||
AddServerAction.ID,
|
||||
AddServerAction.LABEL);
|
||||
|
||||
@@ -16,6 +16,7 @@ import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
import { CustomTreeViewPanel, CustomTreeView } from 'sql/workbench/browser/parts/views/customView';
|
||||
import { VIEWLET_ID } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
interface IUserFriendlyViewDescriptor {
|
||||
id: string;
|
||||
@@ -105,11 +106,13 @@ export class DataExplorerContainerExtensionHandler implements IWorkbenchContribu
|
||||
const viewDescriptor = <ITreeViewDescriptor>{
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
ctorDescriptor: { ctor: CustomTreeViewPanel },
|
||||
ctorDescriptor: new SyncDescriptor(CustomTreeViewPanel),
|
||||
when: ContextKeyExpr.deserialize(item.when),
|
||||
canToggleVisibility: true,
|
||||
collapsed: this.showCollapsed(container),
|
||||
treeView: this.instantiationService.createInstance(CustomTreeView, item.id, item.name, container)
|
||||
treeView: this.instantiationService.createInstance(CustomTreeView, item.id, item.name, container),
|
||||
extensionId: extension.description.identifier,
|
||||
originalContainerId: entry.key
|
||||
};
|
||||
|
||||
viewIds.push(viewDescriptor.id);
|
||||
@@ -129,15 +132,15 @@ export class DataExplorerContainerExtensionHandler implements IWorkbenchContribu
|
||||
|
||||
for (let descriptor of viewDescriptors) {
|
||||
if (typeof descriptor.id !== 'string') {
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "id"));
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'id'));
|
||||
return false;
|
||||
}
|
||||
if (typeof descriptor.name !== 'string') {
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", "name"));
|
||||
collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'name'));
|
||||
return false;
|
||||
}
|
||||
if (descriptor.when && typeof descriptor.when !== 'string') {
|
||||
collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", "when"));
|
||||
collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", 'when'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import { ShowViewletAction, Viewlet } from 'vs/workbench/browser/viewlet';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ViewPaneContainer, ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
|
||||
export const VIEWLET_ID = 'workbench.view.connections';
|
||||
|
||||
@@ -62,7 +63,7 @@ export class DataExplorerViewletViewsContribution implements IWorkbenchContribut
|
||||
return {
|
||||
id: ConnectionViewletPanel.ID,
|
||||
name: localize('dataExplorer.servers', "Servers"),
|
||||
ctorDescriptor: { ctor: ConnectionViewletPanel },
|
||||
ctorDescriptor: new SyncDescriptor(ConnectionViewletPanel),
|
||||
weight: 100,
|
||||
canToggleVisibility: true,
|
||||
order: 0
|
||||
@@ -159,6 +160,6 @@ export class DataExplorerViewPaneContainer extends ViewPaneContainer {
|
||||
export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: VIEWLET_ID,
|
||||
name: localize('dataexplorer.name', "Connections"),
|
||||
ctorDescriptor: { ctor: DataExplorerViewPaneContainer },
|
||||
ctorDescriptor: new SyncDescriptor(DataExplorerViewPaneContainer),
|
||||
icon: 'dataExplorer'
|
||||
}, ViewContainerLocation.Sidebar);
|
||||
|
||||
Reference in New Issue
Block a user