mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
scm: don't send resource states commands back and forward
This commit is contained in:
@@ -56,15 +56,19 @@ class MainThreadSCMResourceGroup implements ISCMResourceGroup {
|
||||
class MainThreadSCMResource implements ISCMResource {
|
||||
|
||||
constructor(
|
||||
private proxy: ExtHostSCMShape,
|
||||
private sourceControlHandle: number,
|
||||
private groupHandle: number,
|
||||
private handle: number,
|
||||
public sourceUri: URI,
|
||||
public command: Command | undefined,
|
||||
public resourceGroup: ISCMResourceGroup,
|
||||
public decorations: ISCMResourceDecorations
|
||||
) { }
|
||||
|
||||
open(): TPromise<void> {
|
||||
return this.proxy.$executeResourceCommand(this.sourceControlHandle, this.groupHandle, this.handle);
|
||||
}
|
||||
|
||||
toJSON(): any {
|
||||
return {
|
||||
$mid: 3,
|
||||
@@ -182,7 +186,7 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
|
||||
for (const [start, deleteCount, rawResources] of groupSlices) {
|
||||
const resources = rawResources.map(rawResource => {
|
||||
const [handle, sourceUri, command, icons, tooltip, strikeThrough, faded] = rawResource;
|
||||
const [handle, sourceUri, icons, tooltip, strikeThrough, faded] = rawResource;
|
||||
const icon = icons[0];
|
||||
const iconDark = icons[1] || icon;
|
||||
const decorations = {
|
||||
@@ -194,11 +198,11 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
};
|
||||
|
||||
return new MainThreadSCMResource(
|
||||
this.proxy,
|
||||
this.handle,
|
||||
groupHandle,
|
||||
handle,
|
||||
URI.parse(sourceUri),
|
||||
command,
|
||||
group,
|
||||
decorations
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user