Support scmResourceState in when clauses

fixes #86180

* Adds `contextValue?: string` to the SourceControlResourceState
* Allows when clause in scm/resourceState/context menus to use scmResourceState
This commit is contained in:
mjcrouch
2020-02-18 23:03:03 +00:00
committed by mjcrouch
parent 69e0508b63
commit 11f523c6d7
7 changed files with 69 additions and 19 deletions

View File

@@ -306,8 +306,9 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
const tooltip = (r.decorations && r.decorations.tooltip) || '';
const strikeThrough = r.decorations && !!r.decorations.strikeThrough;
const faded = r.decorations && !!r.decorations.faded;
const contextValue = r.contextValue || '';
const rawResource = [handle, sourceUri, icons, tooltip, strikeThrough, faded] as SCMRawResource;
const rawResource = [handle, sourceUri, icons, tooltip, strikeThrough, faded, contextValue] as SCMRawResource;
return { rawResource, handle };
});