All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.tools.process.GuideIndex.dml Maven / Gradle / Ivy

%1552369563033
@
sname=GuideIndex
slabel=GuideIndex
sdescritporForNewThing=xworker.message.MessageWithToolbar
Sdescription=
#$@text#$@

进程执行器向导

    设置进程命令和设置工作目录或环境变量的工具。

设置命令和工作目录的方法

    可以参看下面的代码,其中codeText和thingForm变量从父变量上下文中获取。

<?xml version="1.0" encoding="utf-8"?>

<GroovyAction name="complete" descriptors="xworker.lang.actions.Actions/@GroovyAction">
    <code><![CDATA[def command = "java\n-classpath\n\"xworker.jar\"\n xworker.filesync.FileSync\n";
command = command + module.getMetadata().getName();

def values = [
   workDir : world.getPath(),
   enviroment: ""
];

//设置命令
codeText.setText(command);
//设置工作目录和环境变量
thingForm.doAction("setValues", actionContext, "values", values);

//关闭当前窗口
shell.dispose();]]></code>
    <Variables>
        <GetParentContextValue name="shell" varName="shell"></GetParentContextValue>
        <GetParentContextValue name="codeText" varName="codeText"></GetParentContextValue>
        <GetParentContextValue name="thingForm" varName="thingForm"></GetParentContextValue>
    </Variables>
</GroovyAction>

 

#$@text#$@ sdescriptors=xworker.lang.util.ThingIndex sinheritDescription=false sth_createIndex=true sth_registThing=child|xworker.lang.util.ThingIndex sth_registMyChilds=false sth_registDisabled=false sgroup=xworker.tools.processExecutor sth_mark=false




© 2015 - 2024 Weber Informatics LLC | Privacy Policy