import { commands } from 'vscode' ; import { assert } from '../fixed_assert' ; const isParameterFileContextName = `azurerm-vscode-tools-isParamFile` ; const hasTemplateFileContextName = `azurerm-vscode-tools-hasTemplateFile` ; const hasParameterFileContextName = `azurerm-vscode-tools-hasParamFile` ; export function setContext ( value ) { assert ( ! ( value . isTemplateFile && value . isParamFile ) ) ; assert ( ! ( ! value . isTemplateFile && value . hasParamFile ) ) ; assert ( ! ( ! value . isParamFile && value . hasTemplateFile ) ) ; commands . executeCommand ( 'setContext' , hasParameterFileContextName , value . isTemplateFile && value . hasParamFile ) ; commands . executeCommand ( 'setContext' , isParameterFileContextName , value . isParamFile ) ; commands . executeCommand ( 'setContext' , hasTemplateFileContextName , value . hasTemplateFile ) ; }