mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
scm: move method down
This commit is contained in:
@@ -180,6 +180,33 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
|
||||
this._onDidUpdateResourceStates.fire();
|
||||
}
|
||||
|
||||
readonly handle = ExtHostSourceControlResourceGroup._handlePool++;
|
||||
private _disposables: IDisposable[] = [];
|
||||
|
||||
constructor(
|
||||
private _proxy: MainThreadSCMShape,
|
||||
private _commands: ExtHostCommands,
|
||||
private _sourceControlHandle: number,
|
||||
private _id: string,
|
||||
private _label: string,
|
||||
) {
|
||||
this._proxy.$registerGroup(_sourceControlHandle, this.handle, _id, _label);
|
||||
}
|
||||
|
||||
getResourceState(handle: number): vscode.SourceControlResourceState | undefined {
|
||||
return this._resourceStatesMap.get(handle);
|
||||
}
|
||||
|
||||
async $executeResourceCommand(handle: number): TPromise<void> {
|
||||
const command = this._resourceStatesCommandsMap.get(handle);
|
||||
|
||||
if (!command) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._commands.executeCommand(command.command, ...command.arguments);
|
||||
}
|
||||
|
||||
_takeResourceStateSnapshot(): SCMRawResourceSplice[] {
|
||||
const snapshot = [...this._resourceStates].sort(compareResourceStates);
|
||||
const diffs = sortedDiff(this._resourceSnapshot, snapshot, compareResourceStates);
|
||||
@@ -240,33 +267,6 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
|
||||
return splices;
|
||||
}
|
||||
|
||||
readonly handle = ExtHostSourceControlResourceGroup._handlePool++;
|
||||
private _disposables: IDisposable[] = [];
|
||||
|
||||
constructor(
|
||||
private _proxy: MainThreadSCMShape,
|
||||
private _commands: ExtHostCommands,
|
||||
private _sourceControlHandle: number,
|
||||
private _id: string,
|
||||
private _label: string,
|
||||
) {
|
||||
this._proxy.$registerGroup(_sourceControlHandle, this.handle, _id, _label);
|
||||
}
|
||||
|
||||
getResourceState(handle: number): vscode.SourceControlResourceState | undefined {
|
||||
return this._resourceStatesMap.get(handle);
|
||||
}
|
||||
|
||||
async $executeResourceCommand(handle: number): TPromise<void> {
|
||||
const command = this._resourceStatesCommandsMap.get(handle);
|
||||
|
||||
if (!command) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._commands.executeCommand(command.command, ...command.arguments);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this._proxy.$unregisterGroup(this._sourceControlHandle, this.handle);
|
||||
this._disposables = dispose(this._disposables);
|
||||
|
||||
Reference in New Issue
Block a user