^1649841322558
@
sname
ThingEditorCommandDomain
slabel
事物编辑器命令
sextends
xworker.core.command.BaseDomain
sen_label
Model editor commands
sdescriptors
xworker.core.command.CommandDomain
sinheritDescription
false
sth_createIndex
true
sth_registThing
child|xworker.core.command.CommandDomainIndex
sth_registMyChilds
false
sth_registDisabled
false
sth_noThingRegistViewer
false
sgroup
xworker.thingEditor
sth_fileMonitor
false
sth_deprecated
false
sth_mark
false
sth_registQueryOnlySelf
false
  @/@OtherCommands
  sname
  OtherCommands
  sdescriptors
  xworker.core.command.CommandDomain/@OtherCommands
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  OtherCommands
    @/@OtherCommands/@list_nodes
    sname
    list_nodes
    slabel
    模型节点列表
    shasContents
    true
    sen_label
    Model node list
    sdescriptors
    xworker.core.command.CommandDomain/@Command
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    list_nodes
      @/@OtherCommands/@list_nodes/@actions
      sname
      actions
      sdescriptors
      xworker.core.command.CommandDomain/@Command/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@OtherCommands/@list_nodes/@actions/@getContents
        sname
        getContents
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.command.ThingEditorCommand
        smethodName
        list_nodesContents
        sdisableGlobalContext
        false
        sattributeTemplate
        false
        sinterpretationType
        Action
        svarScope
        Global
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@JavaAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        getContents
    @/@OtherCommands/@list_add_childs
    sname
    list_add_childs
    slabel
    可添加子节点列表
    shasContents
    true
    sen_label
    Can add child node list
    sdescriptors
    xworker.core.command.CommandDomain/@OtherCommands/@Command
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    list_add_childs
      @/@OtherCommands/@list_add_childs/@actions
      sname
      actions
      sdescriptors
      xworker.core.command.CommandDomain/@Command/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@OtherCommands/@list_add_childs/@actions/@run
        sname
        getContents
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Local
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.swt.xwidgets.SelectContent;

if(actionContext.get("doInitChildTree") == false){
    //如果子节点树没有初始化，那么初始化
    actionContext.getScope(0).put("doInitChildTree", true);
    descriptsComboSelection.handleEvent(null);
}

//查找子节点
def dess = childScripts.doAction("searchChilds", actionContext, ["keyword": text]);

def contents = [];
for(des in dess){
    def content = new SelectContent(des.getMetadata().getLabel(), des);
    contents.add(content);
}

return contents;
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        run
    @/@OtherCommands/@SelectThingAttributes
    sname
    SelectThingAttributes
    slabel
    选择模型属性
    shasContents
    true
    sen_label
    Select model attributes
    sdescriptors
    xworker.core.command.CommandDomain/@OtherCommands/@Command
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    SelectThingAttributes
      @/@OtherCommands/@SelectThingAttributes/@actions
      sname
      actions
      sdescriptors
      xworker.core.command.CommandDomain/@Command/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@OtherCommands/@SelectThingAttributes/@actions/@run
        sname
        getContents
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Local
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.swt.xwidgets.SelectContent;
import xworker.lang.util.UtilData;
if(text == null){
	text = "";
}

text = text.toLowerCase();
def txts = text.split("[ ]");
def contents = [];
def context = [:];
for(des in currentThing.getAllAttributesDescriptors()){
    def name = des.getMetadata().getName();
    def label= name +  "(" + des.getMetadata().getLabel() + ")";
    label = label.toLowerCase();
    if(UtilData.indexHas(label, txts) && context.get(name) == null){
        def content = new SelectContent(label, label, name,name );
        contents.add(content);
        
        context.put(name, name);
    }
}

return contents;
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        run
    @/@OtherCommands/@list_methods
    sname
    list_methods
    slabel
    模型方法列表
    shasContents
    true
    sen_label
    Model method list
    sdescriptors
    xworker.core.command.CommandDomain/@OtherCommands/@Command
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    list_methods
      @/@OtherCommands/@list_methods/@actions
      sname
      actions
      sdescriptors
      xworker.core.command.CommandDomain/@Command/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@OtherCommands/@list_methods/@actions/@run
        sname
        getContents
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Local
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.swt.xwidgets.SelectContent;
import xworker.lang.util.UtilData;
if(text == null){
	text = "";
}

text = text.toLowerCase();
def txts = text.split("[ ]");
def contents = [];
def context = [:];
for(des in currentThing.getActionThings()){
    def name = des.getMetadata().getName();
    def label= name;
    label = label.toLowerCase();
    if(UtilData.indexHas(label, txts) && context.get(name) == null){
        def content = new SelectContent(name, name, name,name );
        contents.add(content);
        
        context.put(name, name);
    }
}

return contents;
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        run
  @/@select
  sname
  find
  slabel
  查找模型
  shasContents
  false
  sen_label
  Find model
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  select
    @/@select/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@select/@actions/@run1
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      actions.doAction("selectThing", actionContext, ["thing": thingNode]);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run1
    @/@select/@thing
    sname
    thingNode
    slabel
    模型节点
    scommand
    xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain/@OtherCommands/@list_nodes
    sen_label
    Model node
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    thing
  @/@add1
  sname
  add
  slabel
  添加子节点
  shasContents
  false
  sen_label
  Add child node
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  add1
    @/@add1/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@add1/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import org.xmeta.Thing;
import xworker.lang.executor.Executor;

def TAG = "xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain.p_1923577763.run";

//检查事物是否已经变更
def checkedThing = actions.doAction("checkThing", ["thing":currentThing]);
if(checkedThing == null || checkedThing instanceof String){
    Executor.info(TAG, "CheckThing failure");
    return;
}
currentThing = checkedThing;


//def selectIndex = childList.getSelectionIndex();
def childStructure = descriptor;
if(childStructure == null){
    Executor.info(TAG, "descriptor is null");
    return;
}

def childData = ["name": name];

//创建和添加子节点
Thing childObj = new Thing(null, null, childStructure.metadata.path, false);
childObj.cognize(childData);
childObj.set("descriptors", childStructure.metadata.path);        

def treeItem = innerOutline.getSelection()[0];
currentThing.addChild(childObj);
currentThing.save();
//actions.doAction("save", actionContext);
actionContext.getScope(0).put("rootLastModified", currentThing.getRoot().getMetadata().getLastModified());
currentThing = world.getThing(currentThing.metadata.path);
childObj = currentThing.childs.get(currentThing.childs.size() - 1);

TreeItem newItem = new TreeItem(treeItem, SWT.NONE);
actions.doAction("initOutlineTreeItem", actionContext, ["treeItem": newItem, "thing": childObj]);
//currentAddModel.doAction("setValue", currentAddModelContext);

def thingEntry = actionContext.get("thingEntry");
if(thingEntry != null){
    thingEntry.getThing();
}
treeItem.setExpanded(true);
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
    @/@add1/@descritpor
    sname
    descriptor
    slabel
    子节点描述者
    scommand
    xworker.ide.worldexplorer.swt.command.ThingEditorCommandDomain/@OtherCommands/@list_add_childs
    sen_label
    Child node descriptor
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    descritpor
    @/@add1/@name
    sname
    name
    slabel
    名称
    scommand
    xworker.core.command.BaseDomain/@OtherCommands/@InputText
    sen_label
    Name
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    name
  @/@remove
  sname
  delete
  slabel
  删除节点
  shasContents
  false
  sdescription
  <p>删除当前选中的节点？</p>
  sen_label
  Delete node
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sen_description
  <p>Delete the currently selected node? </p>
  sth_mark
  false
  sid
  remove
    @/@remove/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@remove/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
def treeItem = innerOutline.getSelection()[0];
def parentTreeItem = treeItem.getParentItem();
treeItem.dispose();

def parent = currentThing.getParent();
parent.removeChild(currentThing);
parent.save();
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
    @/@remove/@choice
    sname
    choice
    slabel
    选择
    scommand
    xworker.core.command.BaseDomain/@OtherCommands/@YesNo
    sen_label
    Select
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    choice
  @/@set
  sname
  set
  slabel
  设置属性
  shasContents
  false
  sen_label
  Set properties
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  set
    @/@set/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@set/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
def ovalues = currentModel.doAction("getValue", currentModelContext);
ovalues.put(name, value);
currentModel.doAction("setValue", currentModelContext, ["thingAttributes": ovalues]);

//执行保存
okButtonSelection.handleEvent(null);
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
    @/@set/@attributeName
    sname
    name
    slabel
    属性名
    scommand
    xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain/@OtherCommands/@SelectThingAttributes
    sen_label
    Attribute name
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    attributeName
    @/@set/@value
    sname
    value
    slabel
    属性值
    scommand
    xworker.core.command.BaseDomain/@OtherCommands/@InputText
    sen_label
    Attribute value
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    value
  @/@Save
  sname
  save
  slabel
  保存
  shasContents
  false
  sen_label
  Save
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  Save
    @/@Save/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@Save/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      okButtonSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@select1
  sname
  select
  slabel
  选择节点
  shasContents
  false
  sen_label
  Select node
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  select1
    @/@select1/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@select1/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.xmeta.ActionContext;

def ac = new ActionContext();
ac.put("parent", commandExecutor.getActionContext().get("shell"));
ac.put("thing", currentThing.getRoot().getMetadata().getPath());
ac.put("currentThing", currentThing);
ac.put("ec", actionContext);

def shellThing = world.getThing("xworker.ide.worldexplorer.swt.command.SelectNodesShell");
def shell = shellThing.doAction("create", ac);
shell.open();
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@edit
  sname
  edit
  slabel
  编辑属性
  sen_label
  Edit attribute
  sdescriptors
  xworker.core.command.CommandDomain/@CompoisteCommand
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  edit
    @/@edit/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@edit/@actions/@run
      sname
      runbak
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import xworker.swt.util.SwtDialog;

//属性的描述者
def descriptor = currentThing.getAttributeDescriptor(name);

if(descriptor != null){
    def ac = new ActionContext();
    ac.put("parent", commandExecutor.getActionContext().get("shell"));
    ac.put("thing", currentThing.getRoot().getMetadata().getPath());
    ac.put("currentThing", currentThing);
    ac.put("ec", actionContext);
    
    def thing = new Thing("xworker.lang.MetaDescriptor3");
    thing.addChild(descriptor.detach());
    
    def ovalues = currentModel.doAction("getValue", currentModelContext);
    
    def newThing = new Thing(thing.getMetadata().getPath());
    newThing.put(name, ovalues.get(name));
    
    def shellThing = world.getThing("xworker.swt.ide.worldexplorer.swt.command.EditAttributeShell");
    def shell = shellThing.doAction("create", ac);
    ac.thingForm.doAction("setThing", ac, ["thing": newThing]);
    ac.thingForm.doAction("setFocus", ac);
    
    def dialog = new SwtDialog(shell, ac);
    def result = dialog.open();
    if(result != null){
        ovalues.put(name, result.get(name));
        currentModel.doAction("setValue", currentModelContext, ["thingAttributes": ovalues]);
    }
}
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
    @/@edit/@attributeName
    sname
    name
    slabel
    属性名
    scommand
    xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain/@OtherCommands/@SelectThingAttributes
    sen_label
    Attribute name
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    attributeName
    @/@edit/@Composite
    sname
    Composite
    sBORDER
    false
    sH_SCROLL
    false
    sV_SCROLL
    false
    sNO_BACKGROUND
    false
    sNO_FOCUS
    false
    sNO_MERGE_PAINTS
    false
    sNO_REDRAW_RESIZE
    false
    sNO_RADIO_GROUP
    false
    sEMBEDDED
    false
    sDOUBLE_BUFFERED
    false
    scapture
    false
    senabled
    true
    sredraw
    true
    spack
    false
    svisible
    true
    sdescriptors
    xworker.core.command.CommandDomain/@CompoisteCommand/@Composite
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    Composite
      @/@edit/@Composite/@thingForm
      sname
      thingForm
      scolumn
      1
      sH_SCROLL
      true
      sV_SCROLL
      true
      sNO_BACKGROUND
      false
      sNO_FOCUS
      false
      sNO_MERGE_PAINTS
      false
      sNO_REDRAW_RESIZE
      false
      sNO_RADIO_GROUP
      false
      sEMBEDDED
      false
      sDOUBLE_BUFFERED
      false
      sdescriptors
      xworker.swt.Widgets/@ThingForm
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      thingForm
      @/@edit/@Composite/@compositeFillLayout
      sname
      compositeFillLayout
      stype
      SWT.HORIZONTAL
      sdescriptors
      xworker.swt.Layouts/@FillLayout
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      compositeFillLayout
      @/@edit/@Composite/@init
      sname
      init
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import xworker.swt.util.SwtDialog;

actionContext.g().put("currentThing", domainContext.currentThing);
actionContext.g().put("currentModel", domainContext.currentModel);
actionContext.g().put("currentModelContext",  domainContext.currentModelContext);
actionContext.g().put("okButtonSelection", domainContext.okButtonSelection);

//属性的描述者
def descriptor = currentThing.getAttributeDescriptor(name);

if(descriptor != null){    
    def thing = new Thing("xworker.lang.MetaDescriptor3");
    thing.addChild(descriptor.detach());
    
    def ovalues = currentModel.doAction("getValue", currentModelContext);
    
    def newThing = new Thing(thing.getMetadata().getPath());
    newThing.put(name, ovalues.get(name));
    thingForm.doAction("setThing", actionContext, ["thing": newThing]);
    
    executorContext.mainComposite.display.asyncExec({
        thingForm.doAction("setFocus", actionContext);
    });
}
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.swt.widgets.Widget/@Code
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      init
    @/@edit/@Buttons
    sname
    Buttons
    sdescriptors
    xworker.core.command.CommandDomain/@CompoisteCommand/@Buttons
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    Buttons
      @/@edit/@Buttons/@saveButton
      sname
      saveButton
      stext
      lang:d=保存(&amp;S)&en=Save(&amp;S)
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      spack
      false
      svisible
      true
      sdescriptors
      xworker.core.command.CommandDomain/@CompoisteCommand/@Buttons/@Button
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      saveButton
        @/@edit/@Buttons/@saveButton/@onSelection
        sname
        onSelection
        sdescriptors
        xworker.swt.widgets.Widget/@Event
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        onSelection
          @/@edit/@Buttons/@saveButton/@onSelection/@GroovyAction
          sname
          GroovyAction
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
def ovalues = currentModel.doAction("getValue", currentModelContext);
def result = thingForm.doAction("getValues", actionContext);
if(result != null){
    ovalues.put(name, result.get(name));
    currentModel.doAction("setValue", currentModelContext, ["thingAttributes": ovalues]);
    
    //保存模型编辑器
    okButtonSelection.handleEvent(null);
}
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sdebugLog
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          GroovyAction
  @/@run
  sname
  run
  slabel
  执行方法
  shasContents
  false
  sen_label
  Execute method
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  run
    @/@run/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@run/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.xmeta.ActionContext;

def ac = new ActionContext();
ac.put("parentContext", actionContext);
println(currentThing.doAction(action, ac));
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
    @/@run/@action
    sname
    action
    slabel
    动作
    scommand
    xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain/@OtherCommands/@list_methods
    sen_label
    Action
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@Parameter
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    action
  @/@expand
  sname
  expand
  slabel
  展开当前节点
  shasContents
  false
  sen_label
  Expand current node
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  expand
    @/@expand/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@expand/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      innerOutline.getSelection()[0].setExpanded(true);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@moveup
  sname
  moveup
  slabel
  节点上移
  shasContents
  false
  sen_label
  Nod move up
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  moveup
    @/@moveup/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@moveup/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      moveUpButtonSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@movedown
  sname
  movedown
  slabel
  节点下移
  shasContents
  false
  sen_label
  Node move down
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  movedown
    @/@movedown/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@movedown/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      moveDownButtonSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@copy
  sname
  copy
  slabel
  拷贝
  shasContents
  false
  sen_label
  Copy
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  copy
    @/@copy/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@copy/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      copyMenuSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@copy_path
  sname
  copy_path
  slabel
  拷贝路径
  shasContents
  false
  sen_label
  Copy path
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  copy_path
    @/@copy_path/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@copy_path/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      copyPathSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@paset
  sname
  paset
  slabel
  粘贴
  shasContents
  false
  sen_label
  Paste
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  paset
    @/@paset/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@paset/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      pasteAsChildSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@paste_as_child
  sname
  paste_as_child
  slabel
  粘贴到子节点
  shasContents
  false
  sen_label
  Paste as child
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  paste_as_child
    @/@paste_as_child/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@paste_as_child/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      pasteAsChildSelection.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
  @/@cut
  sname
  cut
  slabel
  剪切
  shasContents
  false
  sen_label
  Cut
  sdescriptors
  xworker.core.command.CommandDomain/@Command
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  cut
    @/@cut/@actions
    sname
    actions
    sdescriptors
    xworker.core.command.CommandDomain/@Command/@actions
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    actions
      @/@cut/@actions/@run
      sname
      run
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      scode
      cutMenuListener.handleEvent(null);
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      run
