mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Merge VS Code 1.21 source code (#1067)
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
This commit is contained in:
@@ -9,15 +9,12 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IUpdateService, IRawUpdate, State, IUpdate } from './update';
|
||||
import { IUpdateService, State } from './update';
|
||||
|
||||
export interface IUpdateChannel extends IChannel {
|
||||
call(command: 'event:onError'): TPromise<void>;
|
||||
call(command: 'event:onUpdateAvailable'): TPromise<void>;
|
||||
call(command: 'event:onUpdateNotAvailable'): TPromise<void>;
|
||||
call(command: 'event:onUpdateReady'): TPromise<void>;
|
||||
call(command: 'event:onStateChange'): TPromise<void>;
|
||||
call(command: 'checkForUpdates', arg: boolean): TPromise<IUpdate>;
|
||||
call(command: 'checkForUpdates', arg: any): TPromise<void>;
|
||||
call(command: 'downloadUpdate'): TPromise<void>;
|
||||
call(command: 'applyUpdate'): TPromise<void>;
|
||||
call(command: 'quitAndInstall'): TPromise<void>;
|
||||
call(command: '_getInitialState'): TPromise<State>;
|
||||
call(command: string, arg?: any): TPromise<any>;
|
||||
@@ -29,12 +26,10 @@ export class UpdateChannel implements IUpdateChannel {
|
||||
|
||||
call(command: string, arg?: any): TPromise<any> {
|
||||
switch (command) {
|
||||
case 'event:onError': return eventToCall(this.service.onError);
|
||||
case 'event:onUpdateAvailable': return eventToCall(this.service.onUpdateAvailable);
|
||||
case 'event:onUpdateNotAvailable': return eventToCall(this.service.onUpdateNotAvailable);
|
||||
case 'event:onUpdateReady': return eventToCall(this.service.onUpdateReady);
|
||||
case 'event:onStateChange': return eventToCall(this.service.onStateChange);
|
||||
case 'checkForUpdates': return this.service.checkForUpdates(arg);
|
||||
case 'downloadUpdate': return this.service.downloadUpdate();
|
||||
case 'applyUpdate': return this.service.applyUpdate();
|
||||
case 'quitAndInstall': return this.service.quitAndInstall();
|
||||
case '_getInitialState': return TPromise.as(this.service.state);
|
||||
}
|
||||
@@ -46,19 +41,8 @@ export class UpdateChannelClient implements IUpdateService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
private _onError = eventFromCall<any>(this.channel, 'event:onError');
|
||||
get onError(): Event<any> { return this._onError; }
|
||||
|
||||
private _onUpdateAvailable = eventFromCall<{ url: string; version: string; }>(this.channel, 'event:onUpdateAvailable');
|
||||
get onUpdateAvailable(): Event<{ url: string; version: string; }> { return this._onUpdateAvailable; }
|
||||
|
||||
private _onUpdateNotAvailable = eventFromCall<boolean>(this.channel, 'event:onUpdateNotAvailable');
|
||||
get onUpdateNotAvailable(): Event<boolean> { return this._onUpdateNotAvailable; }
|
||||
|
||||
private _onUpdateReady = eventFromCall<IRawUpdate>(this.channel, 'event:onUpdateReady');
|
||||
get onUpdateReady(): Event<IRawUpdate> { return this._onUpdateReady; }
|
||||
|
||||
private _onRemoteStateChange = eventFromCall<State>(this.channel, 'event:onStateChange');
|
||||
|
||||
private _onStateChange = new Emitter<State>();
|
||||
get onStateChange(): Event<State> { return this._onStateChange.event; }
|
||||
|
||||
@@ -78,8 +62,16 @@ export class UpdateChannelClient implements IUpdateService {
|
||||
}, onUnexpectedError);
|
||||
}
|
||||
|
||||
checkForUpdates(explicit: boolean): TPromise<IUpdate> {
|
||||
return this.channel.call('checkForUpdates', explicit);
|
||||
checkForUpdates(context: any): TPromise<void> {
|
||||
return this.channel.call('checkForUpdates', context);
|
||||
}
|
||||
|
||||
downloadUpdate(): TPromise<void> {
|
||||
return this.channel.call('downloadUpdate');
|
||||
}
|
||||
|
||||
applyUpdate(): TPromise<void> {
|
||||
return this.channel.call('applyUpdate');
|
||||
}
|
||||
|
||||
quitAndInstall(): TPromise<void> {
|
||||
|
||||
Reference in New Issue
Block a user