integrate with contextkeyservice (#804)

* commting .d.ts changes

* added serverinfo to .d.ts

* maybe its working?

* works

* updated contrib

* remove unnecessary code

* fix compile errors

* change back sqlops engine for merge
This commit is contained in:
Anthony Dresser
2018-03-06 13:56:04 -08:00
committed by GitHub
parent 0bba972657
commit 9f5268101d
27 changed files with 336 additions and 103 deletions

View File

@@ -0,0 +1,23 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import Event from 'vs/base/common/event';
import * as sqlops from 'sqlops';
export const IDashboardService = createDecorator<IDashboardService>('dashboardService');
export interface IDashboardService {
_serviceBrand: any;
readonly onDidOpenDashboard: Event<sqlops.DashboardDocument>;
readonly onDidChangeToDashboard: Event<sqlops.DashboardDocument>;
openDashboard(document: sqlops.DashboardDocument): void;
changeToDashboard(document: sqlops.DashboardDocument): void;
}

View File

@@ -0,0 +1,28 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IDashboardService } from './dashboardService';
import Event, { Emitter } from 'vs/base/common/event';
import * as sqlops from 'sqlops';
export class DashboardService implements IDashboardService {
public _serviceBrand: any;
private _onDidOpenDashboard = new Emitter<sqlops.DashboardDocument>();
public readonly onDidOpenDashboard: Event<sqlops.DashboardDocument> = this._onDidOpenDashboard.event;
private _onDidChangeToDashboard = new Emitter<sqlops.DashboardDocument>();
public readonly onDidChangeToDashboard: Event<sqlops.DashboardDocument> = this._onDidChangeToDashboard.event;
public openDashboard(document: sqlops.DashboardDocument): void {
this._onDidOpenDashboard.fire(document);
}
public changeToDashboard(document: sqlops.DashboardDocument): void {
this._onDidChangeToDashboard.fire(document);
}
}