Include virtual workspace check for task type enablment

This commit is contained in:
Alex Ross 2021-04-14 15:03:07 +02:00
parent 38066c2802
commit 5371ac58c4
No known key found for this signature in database
GPG Key ID: 89DDDBA66CBA7840
5 changed files with 12 additions and 6 deletions

View File

@ -67,7 +67,8 @@
"type": "string",
"description": "%grunt.taskDefinition.file.description%"
}
}
},
"when": "shellExecutionSupported"
}
]
},

View File

@ -63,7 +63,8 @@
"type": "string",
"description": "%gulp.taskDefinition.file.description%"
}
}
},
"when": "shellExecutionSupported"
}
]
},

View File

@ -63,7 +63,8 @@
"type": "string",
"description": "%jake.taskDefinition.file.description%"
}
}
},
"when": "shellExecutionSupported"
}
]
},

View File

@ -1114,7 +1114,8 @@
"option": {
"type": "string"
}
}
},
"when": "shellExecutionSupported"
}
],
"problemPatterns": [

View File

@ -81,6 +81,7 @@ import { ILogService } from 'vs/platform/log/common/log';
import { once } from 'vs/base/common/functional';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { IWorkspaceTrustRequestService } from 'vs/platform/workspace/common/workspaceTrust';
import { VirtualWorkspaceContext } from 'vs/workbench/browser/contextkeys';
const QUICKOPEN_HISTORY_LIMIT_CONFIG = 'task.quickOpen.history';
const PROBLEM_MATCHER_NEVER_CONFIG = 'task.problemMatchers.neverPrompt';
@ -343,13 +344,14 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
const customContext = CustomExecutionSupportedContext.bindTo(this.contextKeyService);
customContext.set(custom);
}
const isVirtual = !!VirtualWorkspaceContext.getValue(this.contextKeyService);
if (shell !== undefined) {
const shellContext = ShellExecutionSupportedContext.bindTo(this.contextKeyService);
shellContext.set(shell);
shellContext.set(shell && !isVirtual);
}
if (process !== undefined) {
const processContext = ProcessExecutionSupportedContext.bindTo(this.contextKeyService);
processContext.set(process);
processContext.set(process && !isVirtual);
}
this._onDidRegisterSupportedExecutions.fire();
}