💥 scm state -> stateContextKey

This commit is contained in:
Joao Moreno
2017-03-27 11:54:17 +02:00
parent 75576e3cca
commit 3d0b9755d3
7 changed files with 10 additions and 10 deletions

View File

@@ -274,7 +274,7 @@ export type SCMRawResourceGroup = [
export abstract class MainThreadSCMShape {
$register(handle: number, features: SCMProviderFeatures): void { throw ni(); }
$unregister(handle: number): void { throw ni(); }
$onChange(handle: number, resources: SCMRawResourceGroup[], count: number | undefined, state: string | undefined): void { throw ni(); }
$onChange(handle: number, resources: SCMRawResourceGroup[], count: number | undefined, stateContextKey: string | undefined): void { throw ni(); }
$setInputBoxValue(value: string): void { throw ni(); }
}

View File

@@ -135,7 +135,7 @@ export class ExtHostSCM {
return [g.uri.toString(), g.contextKey, g.label, rawResources] as SCMRawResourceGroup;
});
this._proxy.$onChange(handle, rawResourceGroups, provider.count, provider.state);
this._proxy.$onChange(handle, rawResourceGroups, provider.count, provider.stateContextKey);
});
return new Disposable(() => {

View File

@@ -31,8 +31,8 @@ class MainThreadSCMProvider implements ISCMProvider {
private _count: number | undefined = undefined;
get count(): number | undefined { return this._count; }
private _state: string | undefined = undefined;
get state(): string | undefined { return this._state; }
private _stateContextKey: string | undefined = undefined;
get stateContextKey(): string | undefined { return this._stateContextKey; }
constructor(
private _handle: number,
@@ -67,7 +67,7 @@ class MainThreadSCMProvider implements ISCMProvider {
// }
}
$onChange(rawResourceGroups: SCMRawResourceGroup[], count: number | undefined, state: string | undefined): void {
$onChange(rawResourceGroups: SCMRawResourceGroup[], count: number | undefined, stateContextKey: string | undefined): void {
this._resources = rawResourceGroups.map(rawGroup => {
const [uri, contextKey, label, rawResources] = rawGroup;
const resources: ISCMResource[] = [];
@@ -95,7 +95,7 @@ class MainThreadSCMProvider implements ISCMProvider {
});
this._count = count;
this._state = state;
this._stateContextKey = stateContextKey;
this._onDidChange.fire(this.resources);
}