Initial Commit
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"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": [
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
|
||||
"<panel-form xmlns=\"http://www.davinti.com.br/vitruvio/form/panel\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.davinti.com.br/vitruvio/form/panel https://bitbucket.org/davinTI/vitruvio-xds/raw/master/vitruvio-panel-form.xsd\">",
|
||||
"\t<form formKey=\"${1}\" width=\"100%\">",
|
||||
"\t\t<name>${2}</name>",
|
||||
"\t\t<description>${3}</description>",
|
||||
"\t\t<components>",
|
||||
"\t\t\t<VerticalLayout spacing=\"true\" margin=\"true\" height=\"100%\" width=\"100%\">",
|
||||
"\t\t\t\t${0}",
|
||||
"\t\t\t</VerticalLayout>",
|
||||
"\t\t</components>",
|
||||
"\t</form>",
|
||||
"</panel-form>"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user