mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
debt remove TPromise from extHost-files #53526
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { Event, Emitter, once } from 'vs/base/common/event';
|
||||
import { debounce } from 'vs/base/common/decorators';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
@@ -604,23 +603,23 @@ export class ExtHostSCM implements ExtHostSCMShape {
|
||||
const sourceControl = this._sourceControls.get(sourceControlHandle);
|
||||
|
||||
if (!sourceControl || !sourceControl.quickDiffProvider) {
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
return asThenable(() => sourceControl.quickDiffProvider.provideOriginalResource(uri, token));
|
||||
}
|
||||
|
||||
$onInputBoxValueChange(sourceControlHandle: number, value: string): TPromise<void> {
|
||||
$onInputBoxValueChange(sourceControlHandle: number, value: string): Promise<void> {
|
||||
this.logService.trace('ExtHostSCM#$onInputBoxValueChange', sourceControlHandle);
|
||||
|
||||
const sourceControl = this._sourceControls.get(sourceControlHandle);
|
||||
|
||||
if (!sourceControl) {
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
sourceControl.inputBox.$onInputBoxValueChange(value);
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
$executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): Thenable<void> {
|
||||
@@ -629,13 +628,13 @@ export class ExtHostSCM implements ExtHostSCMShape {
|
||||
const sourceControl = this._sourceControls.get(sourceControlHandle);
|
||||
|
||||
if (!sourceControl) {
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
const group = sourceControl.getResourceGroup(groupHandle);
|
||||
|
||||
if (!group) {
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
return group.$executeResourceCommand(handle);
|
||||
@@ -647,19 +646,19 @@ export class ExtHostSCM implements ExtHostSCMShape {
|
||||
const sourceControl = this._sourceControls.get(sourceControlHandle);
|
||||
|
||||
if (!sourceControl) {
|
||||
return TPromise.as(undefined);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
if (!sourceControl.inputBox.validateInput) {
|
||||
return TPromise.as(undefined);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
return asThenable(() => sourceControl.inputBox.validateInput(value, cursorPosition)).then(result => {
|
||||
if (!result) {
|
||||
return TPromise.as(undefined);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
return TPromise.as<[string, number]>([result.message, result.type]);
|
||||
return Promise.resolve<[string, number]>([result.message, result.type]);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -697,6 +696,6 @@ export class ExtHostSCM implements ExtHostSCMShape {
|
||||
});
|
||||
|
||||
this._selectedSourceControlHandles = set;
|
||||
return TPromise.as(null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user