{ "Engine debug": { "prefix": "debug", "body": ["engine.debug(${1});"], "description": "Log output to debug" }, "Get field": { "prefix": "getField", "body": [ "engine.getField('${1:FieldName}').${2|getValue,getConvertedValue,getCaptionValue,focus,setValue,setRequired,setEnabled,refresh|}(${3});" ], "description": "Engine get field" }, "Set global variable": { "prefix": "setGlobal", "body": ["engine.setGlobalVariable('$1', $2);"], "description": "Engine set the global variable" }, "Get global variable": { "prefix": "getGlobal", "body": ["engine.getGlobalVariable('${1:VariableName}');"], "description": "Engine get the global variable" }, "Get layout": { "prefix": "getLayout", "body": [ "engine.getLayout('${1:LayoutName}').getRootComposition().setVisible(${2|true,false|});" ], "description": "Engine get the layout" }, "Get process ID": { "prefix": "getProcessInstanceId", "body": ["execution.getProcessInstanceId(${1});"], "description": "Engine get the process Id" }, "Get form data": { "prefix": "getFormData", "body": ["vFormService.getFormData(${1:ProcessID}, '${2:FormKey}');"], "description": "Engine get the form data" }, "Load services": { "prefix": "loadScript", "body": ["var ${1} = libService.loadScript('${1:ScriptName}');"], "description": "Load scripts" }, "function run": { "prefix": "run", "body": ["function run() { ", "\t$1", "}"], "description": "function run" }, "function validator": { "prefix": "validator", "body": [ "function validator() { ", "\tthis.getMessage = function() {", "\t\treturn '${1:MessageValidation}';", "\t}", "", "\tthis.isValid = function() {", "\t\treturn true;", "\t}", "}", "var script = new validator();" ], "description": "function validator" }, "Get variable": { "prefix": "getVariable", "body": ["execution.getVariable('${1:FormName_VariableName}');"], "description": "execution get the variable" }, "Execute on Server": { "prefix": "executeOnServer", "body": [ "vCommunicationService.executeOnServer('${1:BridgeName}', params).then(result=>{", "\tconsole.log(result);", "}).catch(error=>{", "\tconsole.log('Erro retornado da execução no servidor do vitruvio', error);", "});" ], "description": "execution bridge" }, "Create panel-form": { "prefix": "!panel-form", "body": [ "", "", "\t
", "\t\t${2}", "\t\t${3}", "\t\t", "\t\t\t", "\t\t\t\t${0}", "\t\t\t", "\t\t", "\t
", "
" ] }, "Create forms": { "prefix": "!forms", "body": [ "", "", "\t\t", "\t\t\t", "\t\t", "\t
", "\t\t${2}", "\t\t", "\t\t\t", "\t\t\t\t${0}", "\t\t\t", "\t\t", "\t
", "
" ] } }