mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
Merge vscode source through 1.62 release (#19981)
* Build breaks 1 * Build breaks * Build breaks * Build breaks * More build breaks * Build breaks (#2512) * Runtime breaks * Build breaks * Fix dialog location break * Update typescript * Fix ASAR break issue * Unit test breaks * Update distro * Fix breaks in ADO builds (#2513) * Bump to node 16 * Fix hygiene errors * Bump distro * Remove reference to node type * Delete vscode specific extension * Bump to node 16 in CI yaml * Skip integration tests in CI builds (while fixing) * yarn.lock update * Bump moment dependency in remote yarn * Fix drop-down chevron style * Bump to node 16 * Remove playwrite from ci.yaml * Skip building build scripts in hygine check
This commit is contained in:
@@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
|
||||
import { forEach } from 'vs/base/common/collections';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IViewContainersRegistry, ViewContainer, Extensions as ViewContainerExtensions, IViewsRegistry } from 'vs/workbench/common/views';
|
||||
import { IViewContainersRegistry, ViewContainer, Extensions as ViewContainerExtensions, IViewsRegistry, ICustomViewDescriptor } from 'vs/workbench/common/views';
|
||||
import { IExtensionPoint, ExtensionsRegistry, ExtensionMessageCollector } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -16,7 +16,6 @@ import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
import { VIEWLET_ID } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { ICustomViewDescriptor } from 'vs/workbench/api/browser/viewsExtensionPoint';
|
||||
import { CustomTreeView as VSCustomTreeView, TreeViewPane } from 'vs/workbench/browser/parts/views/treeView';
|
||||
import { CustomTreeView } from 'sql/workbench/contrib/views/browser/treeView';
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ export const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainer
|
||||
openCommandActionDescriptor: {
|
||||
id: VIEWLET_ID,
|
||||
mnemonicTitle: localize('showDataExplorer', "Show Connections"),
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_D },
|
||||
keybindings: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyD },
|
||||
order: 0
|
||||
},
|
||||
icon: { id: SqlIconId.dataExplorer },
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as Platform from 'vs/platform/registry/common/platform';
|
||||
import { ViewletDescriptor, Extensions, Viewlet, ViewletRegistry } from 'vs/workbench/browser/viewlet';
|
||||
//import { ViewletDescriptor, Extensions, Viewlet, ViewletRegistry } from 'vs/workbench/browser/viewlet';
|
||||
import * as Types from 'vs/base/common/types';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
import { Extensions, PaneComposite, PaneCompositeDescriptor, PaneCompositeRegistry } from 'vs/workbench/browser/panecomposite';
|
||||
|
||||
suite('Data Explorer Viewlet', () => {
|
||||
|
||||
class DataExplorerTestViewlet extends Viewlet {
|
||||
class DataExplorerTestViewlet extends PaneComposite {
|
||||
constructor() {
|
||||
super('dataExplorer', undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
super('dataExplorer', undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
||||
}
|
||||
|
||||
public override layout(dimension: any): void {
|
||||
@@ -26,7 +27,7 @@ suite('Data Explorer Viewlet', () => {
|
||||
}
|
||||
|
||||
test('ViewletDescriptor API', function () {
|
||||
let d = ViewletDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 1);
|
||||
let d = PaneCompositeDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 1);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
assert.strictEqual(d.cssClass, 'class');
|
||||
@@ -34,26 +35,26 @@ suite('Data Explorer Viewlet', () => {
|
||||
});
|
||||
|
||||
test('Editor Aware ViewletDescriptor API', function () {
|
||||
let d = ViewletDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
let d = PaneCompositeDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
|
||||
d = ViewletDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
d = PaneCompositeDescriptor.create(DataExplorerTestViewlet, 'id', 'name', 'class', 5);
|
||||
assert.strictEqual(d.id, 'id');
|
||||
assert.strictEqual(d.name, 'name');
|
||||
});
|
||||
|
||||
test('Data Explorer Viewlet extension point and registration', function () {
|
||||
assert(Types.isFunction(Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).registerViewlet));
|
||||
assert(Types.isFunction(Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlet));
|
||||
assert(Types.isFunction(Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlets));
|
||||
assert(Types.isFunction(Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).registerPaneComposite));
|
||||
assert(Types.isFunction(Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).getPaneComposite));
|
||||
assert(Types.isFunction(Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).getPaneComposites));
|
||||
|
||||
let oldCount = Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlets().length;
|
||||
let d = ViewletDescriptor.create(DataExplorerTestViewlet, 'dataExplorer-test-id', 'name');
|
||||
Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).registerViewlet(d);
|
||||
let retrieved = Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlet('dataExplorer-test-id');
|
||||
let oldCount = Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).getPaneComposites().length;
|
||||
let d = PaneCompositeDescriptor.create(DataExplorerTestViewlet, 'dataExplorer-test-id', 'name');
|
||||
Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).registerPaneComposite(d);
|
||||
let retrieved = Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).getComposite('dataExplorer-test-id');
|
||||
assert(d === retrieved);
|
||||
let newCount = Platform.Registry.as<ViewletRegistry>(Extensions.Viewlets).getViewlets().length;
|
||||
let newCount = Platform.Registry.as<PaneCompositeRegistry>(Extensions.Viewlets).getPaneComposites().length;
|
||||
assert.strictEqual(oldCount + 1, newCount);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user