mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
wip: git init
This commit is contained in:
@@ -30,6 +30,9 @@ 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; }
|
||||
|
||||
constructor(
|
||||
private _id: string,
|
||||
private proxy: ExtHostSCMShape,
|
||||
@@ -71,7 +74,7 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
// }
|
||||
}
|
||||
|
||||
$onChange(rawResourceGroups: SCMRawResourceGroup[], count: number | undefined): void {
|
||||
$onChange(rawResourceGroups: SCMRawResourceGroup[], count: number | undefined, state: string | undefined): void {
|
||||
this._resources = rawResourceGroups.map(rawGroup => {
|
||||
const [id, label, rawResources] = rawGroup;
|
||||
|
||||
@@ -96,7 +99,9 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
|
||||
return { id, label, resources };
|
||||
});
|
||||
|
||||
this._count = count;
|
||||
this._state = state;
|
||||
|
||||
this._onDidChange.fire(this.resources);
|
||||
}
|
||||
@@ -140,14 +145,14 @@ export class MainThreadSCM extends MainThreadSCMShape {
|
||||
delete this.providers[id];
|
||||
}
|
||||
|
||||
$onChange(id: string, rawResourceGroups: SCMRawResourceGroup[], count: number | undefined): void {
|
||||
$onChange(id: string, rawResourceGroups: SCMRawResourceGroup[], count: number | undefined, state: string | undefined): void {
|
||||
const provider = this.providers[id];
|
||||
|
||||
if (!provider) {
|
||||
return;
|
||||
}
|
||||
|
||||
provider.$onChange(rawResourceGroups, count);
|
||||
provider.$onChange(rawResourceGroups, count, state);
|
||||
}
|
||||
|
||||
$setInputBoxValue(value: string): void {
|
||||
|
||||
Reference in New Issue
Block a user