mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
💥 scm state -> stateContextKey
This commit is contained in:
@@ -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(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user