wip: git init

This commit is contained in:
Joao Moreno
2017-02-15 17:46:58 +01:00
parent a7f80ccece
commit ac703e0d92
14 changed files with 168 additions and 78 deletions

View File

@@ -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 {