Updating language client library to 2.0.0

This commit is contained in:
Leila Lali 2016-08-24 16:21:52 -07:00
Родитель bb0e68c2f9
Коммит 97a95add9a
6 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -144,7 +144,7 @@ gulp.task('ext:copy-tests', () => {
});
gulp.task('ext:copy-packages', () => {
var serviceHostVersion = "0.0.3";
var serviceHostVersion = "0.0.6";
return gulp.src(config.paths.project.root + '/packages/Microsoft.SqlTools.ServiceLayer.' + serviceHostVersion + '/lib/netcoreapp1.0/**/*')
.pipe(gulp.dest(config.paths.project.root + '/out/tools/'))
});

6
npm-shrinkwrap.json сгенерированный
Просмотреть файл

@ -2885,9 +2885,9 @@
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-1.2.0.tgz"
},
"vscode-languageclient": {
"version": "1.4.2",
"from": "vscode-languageclient@>=1.0.0 <2.0.0",
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-1.4.2.tgz"
"version": "2.0.0",
"from": "vscode-languageclient@>=2.0.0 <3.0.0",
"resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.0.0.tgz"
},
"when": {
"version": "3.7.7",

Просмотреть файл

@ -66,7 +66,7 @@
"request": "^2.73.0",
"typemoq": "^0.3.2",
"vscode-extension-telemetry": "^0.0.5",
"vscode-languageclient": "^1.0.0"
"vscode-languageclient": "^2.0.0"
},
"contributes": {
"languages": [

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.SqlTools.ServiceLayer" version="0.0.3" />
<package id="Microsoft.SqlTools.ServiceLayer" version="0.0.6" />
</packages>

Просмотреть файл

@ -5,7 +5,7 @@
import QueryRunner from './queryRunner';
import SqlToolsServiceClient from '../languageservice/serviceclient';
import {QueryExecuteCompleteNotification} from '../models/contracts';
import {INotificationHandler} from 'vscode-languageclient';
import {NotificationHandler} from 'vscode-languageclient';
export class QueryNotificationHandler {
private static _instance: QueryNotificationHandler;
@ -32,7 +32,7 @@ export class QueryNotificationHandler {
}
// handles distributing notifications to appropriate
private handleNotification(): INotificationHandler<any> {
private handleNotification(): NotificationHandler<any> {
const self = this;
return (event) => {
self._queryRunners.get(event.ownerUri).handleResult(event);

Просмотреть файл

@ -7,7 +7,7 @@
import * as path from 'path';
import { ExtensionContext } from 'vscode';
import { LanguageClient, LanguageClientOptions, ServerOptions,
TransportKind, RequestType, NotificationType, INotificationHandler } from 'vscode-languageclient';
TransportKind, RequestType, NotificationType, NotificationHandler } from 'vscode-languageclient';
import * as Utils from '../models/utils';
import {VersionRequest} from '../models/contracts';
import Constants = require('../models/constants');
@ -82,13 +82,13 @@ export default class SqlToolsServiceClient {
* @param type The notification type to register the handler for
* @param handler The handler to register
*/
public onNotification<P>(type: NotificationType<P>, handler: INotificationHandler<P>): void {
public onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): void {
return this.client.onNotification(type, handler);
}
public checkServiceCompatibility(): Promise<boolean> {
return new Promise<boolean>((resolve, reject) => {
this._client.sendRequest(VersionRequest.type).then((result) => {
this._client.sendRequest(VersionRequest.type, undefined).then((result) => {
Utils.logDebug('sqlserverclient version: ' + result);
if (!result || !result.startsWith(Constants.serviceCompatibleVersion)) {