^1752198779459
@
lth_createTime
1717582252392
sname
ThingEdtior
sdescription
<p>检查事物是否还存在。</p>
sdescriptors
xworker.swt.widgets.Display
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@propertiesComposite
  sname
  childsComposite
  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
  slabel
  childsComposite
  sdescriptors
  xworker.swt.Widgets/@Composite
  sid
  propertiesComposite
    @/@propertiesComposite/@childsCompositeGridLayout
    sname
    childsCompositeGridLayout
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    slabel
    childsCompositeGridLayout
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    childsCompositeGridLayout
    @/@propertiesComposite/@structCombo
    sname
    structCombo
    stype
    DROP_DOWN
    sREAD_ONLY
    false
    slabel
    structCombo
    sdescriptors
    xworker.swt.Widgets/@Combo
    sid
    structCombo
      @/@propertiesComposite/@structCombo/@listeners
      sname
      listeners
      slabel
      listeners
      sdescriptors
      xworker.swt.events.Listeners/@listeners
      sid
      listeners
        @/@propertiesComposite/@structCombo/@listeners/@descriptsComboSelection
        sname
        descriptsComboSelection
        stype
        Selection
        slabel
        descriptsComboSelection
        sdescriptors
        xworker.swt.events.Listeners/@listeners/@Listener
        sid
        descriptsComboSelection
          @/@propertiesComposite/@structCombo/@listeners/@descriptsComboSelection/@GroovyAction
          sname
          GroovyAction
          slabel
          GroovyAction
          sisSynchronized
          false
          sthrowException
          false
          suseOtherAction
          false
          Scode
#$@text#$@
int index = structCombo.getSelectionIndex();

def descriptors = structCombo.getData();
def descriptor = descriptors.get(index);

childScripts.doAction("selectDescriptor", ["descriptor":descriptor, "thing":structCombo.getData("thing")]);
#$@text#$@
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sid
          GroovyAction
    @/@propertiesComposite/@childTree
    sname
    childTree
    sselectStyle
    SINGLE
    sV_SCROLL
    true
    sH_SCROLL
    true
    sCHECK
    false
    sFULL_SELECTION
    true
    sHIDE_SELECTION
    false
    sBORDER
    false
    slineVisible
    false
    smultipleColumns
    false
    sheaderVisible
    false
    ssortIndicator
    false
    smoveableColumns
    false
    sheadImages
    false
    ssubImages
    false
    slabel
    childTree
    sdescriptors
    ,xworker.swt.widgets.Tree
    sid
    childTree
      @/@propertiesComposite/@childTree/@childTreeGridData
      sname
      childTreeGridData
      sstyle
      FILL_BOTH
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      childTreeGridData
      sdescriptors
      xworker.swt.Commons/@GridData
      sid
      childTreeGridData
      @/@propertiesComposite/@childTree/@listeners
      sname
      listeners
      slabel
      listeners
      sdescriptors
      xworker.swt.events.Listeners/@listeners
      sid
      listeners
        @/@propertiesComposite/@childTree/@listeners/@childTreeSelection
        sname
        childTreeSelection
        stype
        Selection
        slabel
        childTreeSelection
        sdescriptors
        xworker.swt.events.Listeners/@listeners/@Listener
        sid
        childTreeSelection
          @/@propertiesComposite/@childTree/@listeners/@childTreeSelection/@GroovyAction
          sname
          GroovyAction
          slabel
          GroovyAction
          sisSynchronized
          false
          sthrowException
          false
          suseOtherAction
          false
          svarScope
          Global
          sdisableGlobalContext
          false
          Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.events.SwtListener;
import xworker.swt.listeners.SwtMenuListener;
import org.xmeta.util.UtilString;

import org.eclipse.swt.SWT;

def treeItem = childTree.getSelection()[0];
def objStruct = treeItem.getData();
if(objStruct == null) return;

newThingDescriptor = objStruct;
def globalConfig = world.getThing("_local.xworker.config.GlobalConfig");
def webUrl = globalConfig.getString("webUrl");
childTitleLabel.setText(UtilString.getString("res:res.w_exp:addLabel添加：", actionContext) + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
String toolTipText = "<b><u><a href=\"" + webUrl + "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + objStruct.getMetadata().getPath() + "\">" + objStruct.getMetadata().getName() + "</a></u></b><br/><br/>";    			    
if(objStruct.metadata.description != null){
    String ttText = objStruct.metadata.description;
    childTitleLabel.setData("toolTip", toolTipText + ttText);
}else{
    childTitleLabel.setData("toolTip", toolTipText);
}

for(child in addChildComposite.getChildren()){
    child.dispose();
    addChildComposite.removeControl(child);
}

//初始化编辑内容窗体
Thing structForm = new Thing();
structForm.set("descriptors", "xworker.swt.xworker.ThingDescritporForm");
structForm.name = "contentForm";
structForm.descriptorPath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

def thing = new Thing("", "", objStruct.metadata.path, false);
ActionContext context = new ActionContext();
context.put("parent", addChildComposite);
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildOkButtonSelection);

def structFormObj = structForm.doAction("create", context);
context = structFormObj.getData();
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildOkButtonSelection);
context.contentFormModel.defaultSelection = "addChildOkButtonSelection";
context.contentFormModel.doAction("init", context);
context.contentFormModel.doAction("setValue", context);

currentAddModel = context.contentFormModel;
currentAddModelContext =  context;

addChildComposite.layout();

if(contentEditCompositeStackLayout.topControl != childComposite){
    contentEditComposite.setData("oldTopControl", contentEditCompositeStackLayout.topControl);
    contentEditCompositeStackLayout.topControl = childComposite;
    contentEditComposite.layout();
}

if(actionContext.get("helpBrowserAction") != null){
    helpBrowserAction.doAction("setThing", ["thing":newThingDescriptor]);
}
//log.info("helpBrowserAction=" + helpBrowserAction);
#$@text#$@
          sinterpretationType
          Action
          screateLocalVarScope
          false
          ssaveReturn
          false
          sswitchResult
          false
          sdebugLog
          false
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sid
          GroovyAction
    @/@propertiesComposite/@scripts
    sname
    childScripts
    slabel
    childScripts
    sdescriptors
    xworker.swt.Widgets/@actions
    sid
    scripts
      @/@propertiesComposite/@scripts/@initChilds
      sname
      initChilds
      slabel
      initChilds
      sisSynchronized
      false
      sthrowException
      false
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
def dataObject = _request.get("dataObject");

def descriptors = dataObject.getMetadata().getDescriptors();

structCombo.removeAll();
structCombo.setData("descriptors", descriptors);
for(des in descriptors){
    structCombo.add(des.metadata.label);
}

log.info("ini childs");
structCombo.setData("dataObject", dataObject);
structCombo.select(0);

childScripts.exec("selectDescriptor", ["descriptor":descriptors[0], "dataObject":dataObject]);
#$@text#$@
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sid
      initChilds
      @/@propertiesComposite/@scripts/@selectDescriptor
      sname
      selectDescriptor
      slabel
      selectDescriptor
      sisSynchronized
      false
      sthrowException
      false
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

import java.util.Collections;
import java.util.Comparator;

def desChilds = descriptor.getAllChilds("thing");
long start = System.currentTimeMillis();
//查找并添加注册的子事物
try{
    def registThing = world.getThing("xworker.ide.db.dbindex.app.dataObject.RegistsByThing");
    def rchilds = registThing.doAction("query", actionContext, ["thing":descriptor, "noDescriptor":true, "registType":"child"]);
    for(rc in rchilds){
        def child = world.getThing(rc.get("path"));
        if(child != null){
            if(child.getBoolean("registMyChilds")){
                for(cchild in child.getChilds()){
                    descChilds.add(cchild);
                }
            }else{
                desChilds.add(child);
            }
        }
    }
}catch(Exception e){
    log.info("add regist child error", e);
}

//log.info("getAllChildsTime: " + (System.currentTimeMillis() - start);
dess = [];
for(des in desChilds){
    if(des.getString("many") == "false"){
        if(currentThing.getChilds(des.metadata.name).size() != 0){
            continue;
        }
    }
    dess.add(des);
}
//log.info("Filter by many: " + (System.currentTimeMillis() - start);
//分组
def root = ["childs":[]];
for(des in dess){
    def group = des.getString("group");
    if(group == null || group == ""){
        root.childs.add(des);
    }else{
        for(grs in group.split("[,]")){
            def gs = grs.split("[.]");
            def subRoot = null;
            def currentRoot = root;
            for(g in gs){
                subRoot = currentRoot.get(g);
                if(subRoot == null){ 
                    subRoot = ["childs":[]];
                    subRoot.put("__name__", g);
                    currentRoot.put(g, subRoot);
                }
                currentRoot = subRoot;
            }
            subRoot.childs.add(des);
        }
    }
}

//log.info("grgoup time: " + (System.currentTimeMillis() - start);
//构造子节点树
childTree.removeAll();
createTree(childTree, root);
//log.info("createTreeItem time: " + (System.currentTimeMillis() - start);

def createTree(item, aroot){
    def groups = [];
    for(key in aroot.keySet()){
        def v = aroot.get(key);
        if(v instanceof Map){
            groups.add(v);
        }
    }
    
    //为group排序
    Collections.sort(groups, [
            compare : {
               o1, o2->
               if(o1.__name__.toLowerCase() < o2.__name__.toLowerCase()) return -1;
               if(o1.__name__.toLowerCase() == o2.__name__.toLowerCase()) return 0;
               return 1;
            }
        ] as Comparator);
    for(g in groups){
        Collections.sort(g.childs, [
                compare : {
                   o1, o2->
                   if(o1.metadata.label.toLowerCase() < o2.metadata.label.toLowerCase()) return -1;
                   if(o1.metadata.label.toLowerCase() == o2.metadata.label.toLowerCase()) return 0;
                   return 1;
                }
            ] as Comparator);
        def subItem = new TreeItem(item, SWT.NONE);
        subItem.setText(g.__name__);
        createTree(subItem, g);
    }

    Collections.sort(aroot.childs, [
                compare : {
                   o1, o2->
                   if(o1.metadata.label.toLowerCase() < o2.metadata.label.toLowerCase()) return -1;
                   if(o1.metadata.label.toLowerCase() == o2.metadata.label.toLowerCase()) return 0;
                   return 1;
                }
            ] as Comparator);
    for(child in aroot.childs){
       
        def subItem = new TreeItem(item, SWT.NONE);
        subItem.setText(child.metadata.label);
        subItem.setData(child);
    }
}
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sid
      selectDescriptor
      @/@propertiesComposite/@scripts/@selectChildList
      sname
      selectChildList
      slabel
      selectChildList
      sisSynchronized
      false
      sthrowException
      false
      suseOtherAction
      false
      svarScope
      Global
      Scode
#$@text#$@
import groovy.lang.Binding;

import org.xmeta.DataObject;
import org.xmeta.util.UtilDefault;
import org.xmeta.plugin.view.swt.SwtListener;
import org.xmeta.listener.SwtMenuListener;

import org.eclipse.swt.SWT;

def selectIndex = childList.getSelectionIndex();
if(selectIndex == -1) return;
def objStruct = childList.getData().get(selectIndex);

childTitleLabel.setText("添加：" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
String toolTipText = "<b><u>" + objStruct.getMetadata().getName() + "</u></b><br/><br/>";    			    
if(objStruct.getString("description") != null){
    String ttText = objStruct.getString("description");
    childTitleLabel.setData("toolTip", toolTipText + ttText);
}else{
    childTitleLabel.setData("toolTip", toolTipText);
}

//初始化编辑内容窗体
DataObject structForm = new DataObject();
structForm.setAttribute("descriptors", "view.objects.swt.xworker.StructureForm");
structForm.name = "contentForm";
structForm.structurePath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

for(child in addChildComposite.getChildren()){
    child.dispose();
    addChildComposite.removeControl(child);
}

def dataObject = new DataObject();
Binding cbin = new Binding();
cbin.setVariable("binding", cbin);
cbin.setVariable("parent", addChildComposite);
cbin.setVariable("dataObject", dataObject);
cbin.setVariable("addChildOkButtonSelection", addChildOkButtonSelection);
def structFormObj = structForm.exec("create", cbin);

cbin.contentFormModel.defaultSelection = "addChildOkButtonSelection";
cbin.contentFormModel.exec("init", cbin);
cbin.contentFormModel.exec("setValue", cbin);
binding.setVariable("currentAddModel", cbin.contentFormModel);
binding.setVariable("currentAddModelBin", cbin);
addChildComposite.layout();

contentEditCompositeStackLayout.topControl = childComposite;
contentEditComposite.layout();
#$@text#$@
      sdescriptors
      xworker.lang.actions.Actions/@GroovyAction
      sid
      selectChildList
  @/@outlineTree
  sname
  outlineTree
  sselectStyle
  SINGLE
  sV_SCROLL
  true
  sH_SCROLL
  true
  sCHECK
  false
  sFULL_SELECTION
  false
  sHIDE_SELECTION
  false
  sBORDER
  false
  slineVisible
  false
  smultipleColumns
  false
  sheaderVisible
  false
  ssortIndicator
  false
  smoveableColumns
  false
  sheadImages
  false
  ssubImages
  false
  slabel
  outlineTree
  sdescriptors
  xworker.swt.Widgets/@DataTree
  sid
  outlineTree
    @/@outlineTree/@listeners
    sname
    listeners
    slabel
    listeners
    sdescriptors
    xworker.swt.events.Listeners/@listeners
    sid
    listeners
      @/@outlineTree/@listeners/@outlineTreeSelection
      sname
      outlineTreeSelection
      stype
      Selection
      slabel
      outlineTreeSelection
      sdescriptors
      xworker.swt.events.Listeners/@listeners/@Listener
      sid
      outlineTreeSelection
        @/@outlineTree/@listeners/@outlineTreeSelection/@outlineTreeScript
        sname
        outlineTreeScript
        slabel
        outlineTreeScript
        sisSynchronized
        false
        sthrowException
        false
        suseOtherAction
        false
        svarScope
        Global
        sdisableGlobalContext
        false
        scode
        actions.doAction("openThing", [:]);
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sid
        outlineTreeScript
      @/@outlineTree/@listeners/@outlineTreeDefaultSelection
      sname
      outlineTreeDefaultSelection
      stype
      DefaultSelection
      sref
      outlineTreeSelection
      slabel
      outlineTreeDefaultSelection
      sdescriptors
      xworker.swt.events.Listeners/@listeners/@Listener
      sid
      outlineTreeDefaultSelection
    @/@outlineTree/@popMenu
    sname
    popMenu
    sstyle
    DROP_DOWN
    sNO_RADIO_GROUP
    false
    salign
    LEFT_TO_RIGHT
    slabel
    popMenu
    sdescriptors
    xworker.swt.Widgets/@Menu
    sid
    popMenu
      @/@outlineTree/@popMenu/@copyPath
      sname
      copyPath
      stext
      res:res.w_exp:copyPath:拷贝路径
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      copyPath
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      copyPath
        @/@outlineTree/@popMenu/@copyPath/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@copyPath/@listeners/@copyPathSelection
          sname
          copyPathSelection
          stype
          Selection
          slabel
          copyPathSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          copyPathSelection
            @/@outlineTree/@popMenu/@copyPath/@listeners/@copyPathSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.RTFTransfer;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;

def treeItem = outlineTree.getSelection()[0];
Clipboard clipboard = new Clipboard(outlineTree.getDisplay());
String plainText = treeItem.getData().metadata.path;
TextTransfer textTransfer = TextTransfer.getInstance();
clipboard.setContents([plainText] as String[], [textTransfer] as Transfer[]);
clipboard.dispose();
#$@text#$@
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@popSepartor1
      sname
      popSepartor1
      stext
      ""
      sstyle
      SEPARATOR
      slabel
      popSepartor1
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      popSepartor1
      @/@outlineTree/@popMenu/@moveUpMenu
      sname
      moveUpMenu
      stext
      res:res.w_exp:moveUpNode:节点上移
      sselected
      false
      senabled
      true
      slabel
      moveUpMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      moveUpMenu
        @/@outlineTree/@popMenu/@moveUpMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@moveUpMenu/@listeners/@moveUpMenuSelection
          sname
          moveUpMenuSelection
          stype
          Selection
          slabel
          moveUpMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          moveUpMenuSelection
            @/@outlineTree/@popMenu/@moveUpMenu/@listeners/@moveUpMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            true
            sotherActionPath
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveUpItem/@939/@moveUpButtonSelection/@GroovyAction
            svarScope
            Global
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@moveDownMenu
      sname
      moveDownMenu
      stext
      res:res.w_exp:moveDownNode:节点下移
      sselected
      false
      senabled
      true
      slabel
      moveDownMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      moveDownMenu
        @/@outlineTree/@popMenu/@moveDownMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@moveDownMenu/@listeners/@moveDownMenuSelection
          sname
          moveDownMenuSelection
          stype
          Selection
          slabel
          moveDownMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          moveDownMenuSelection
            @/@outlineTree/@popMenu/@moveDownMenu/@listeners/@moveDownMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            true
            sotherActionPath
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveDownItem/@984/@moveDownButtonSelection/@GroovyAction
            svarScope
            Global
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@popSplit2
      sname
      popSplit2
      stext
      ""
      sstyle
      SEPARATOR
      slabel
      popSplit2
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      popSplit2
      @/@outlineTree/@popMenu/@deleteMenu
      sname
      deleteMenu
      stext
      res:res.w_exp:delete:删除
      sselected
      false
      senabled
      true
      slabel
      deleteMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      deleteMenu
        @/@outlineTree/@popMenu/@deleteMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@deleteMenu/@listeners/@deleteMenuSelection
          sname
          deleteMenuSelection
          stype
          Selection
          slabel
          deleteMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          deleteMenuSelection
            @/@outlineTree/@popMenu/@deleteMenu/@listeners/@deleteMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            true
            sotherActionPath
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@deleteItem/@894/@deleteButtonSelection/@GroovyAction
            svarScope
            Global
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@cutMenu
      sname
      cutMenu
      stext
      res:res.w_exp:cut:剪切
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      cutMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      cutMenu
        @/@outlineTree/@popMenu/@cutMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@cutMenu/@listeners/@cutMenuListener
          sname
          cutMenuListener
          stype
          Selection
          slabel
          cutMenuListener
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          cutMenuListener
            @/@outlineTree/@popMenu/@cutMenu/@listeners/@cutMenuListener/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            Scode
#$@text#$@
copyMenuSelection.handleEvent(null);
deleteMenuSelection.handleEvent(null);
#$@text#$@
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@copyMenu
      sname
      copyMenu
      stext
      res:res.w_exp:copy:复制
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      copyMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      copyMenu
        @/@outlineTree/@popMenu/@copyMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@copyMenu/@listeners/@copyMenuSelection
          sname
          copyMenuSelection
          stype
          Selection
          slabel
          copyMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          copyMenuSelection
            @/@outlineTree/@popMenu/@copyMenu/@listeners/@copyMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            Scode
#$@text#$@
import org.xmeta.Thing;
import xworker.swt.ui.swt.Clipboard;

def treeItem = outlineTree.getSelection()[0];
Thing thing = treeItem.getData();
if(thing != null){
    Clipboard.add(thing.detach(false));
}
#$@text#$@
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@pasteMenu
      sname
      pasteMenu
      stext
      res:res.w_exp:paste:粘贴
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      pasteMenu
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      pasteMenu
        @/@outlineTree/@popMenu/@pasteMenu/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@pasteMenu/@listeners/@pasteMenuSelection
          sname
          pasteMenuSelection
          stype
          Selection
          slabel
          pasteMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          pasteMenuSelection
            @/@outlineTree/@popMenu/@pasteMenu/@listeners/@pasteMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import xworker.swt.ui.swt.Clipboard;

def treeItem = outlineTree.getSelection()[0];
def thing = treeItem.getData();
thing = world.getThing(thing.metadata.path);

def memObj = Clipboard.get();
if(memObj == null) return;

ThingUtil.paste(thing, memObj);
thing.save();
thing.save();

refreshMenuSelection.handleEvent(null);
//world.runAction("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@outlineTree/@popMenu/@refreshMenuItem/@listeners/@refreshMenuSelection/@GroovyAction", actionContext);
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@pasteAsChild
      sname
      pasteAsChild
      stext
      res:res.w_exp:pasetAsChild:粘贴－当作子节点
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      pasteAsChild
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      pasteAsChild
        @/@outlineTree/@popMenu/@pasteAsChild/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@pasteAsChild/@listeners/@pasteAsChildSelection
          sname
          pasteAsChildSelection
          stype
          Selection
          slabel
          pasteAsChildSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          pasteAsChildSelection
            @/@outlineTree/@popMenu/@pasteAsChild/@listeners/@pasteAsChildSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.util.ThingUtil;

import xworker.swt.ui.swt.Clipboard;

//def outlineTree = event.widget.parent.getData("outlineTree");
def treeItem = outlineTree.getSelection()[0];
def thing = treeItem.getData();

def memObj = Clipboard.get();
if(memObj == null) return;

ThingUtil.pasteAsChild(thing, memObj);
thing.save();

refreshMenuSelection.handleEvent(null);
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
      @/@outlineTree/@popMenu/@popSeparator
      sname
      popSeparator
      stext
      ""
      sstyle
      SEPARATOR
      slabel
      popSeparator
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      popSeparator
      @/@outlineTree/@popMenu/@refreshMenuItem
      sname
      refreshMenuItem
      stext
      res:res.w_exp:refresh:刷新
      sstyle
      PUSH
      sselected
      false
      senabled
      true
      slabel
      refreshMenuItem
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sid
      refreshMenuItem
        @/@outlineTree/@popMenu/@refreshMenuItem/@listeners
        sname
        listeners
        slabel
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@outlineTree/@popMenu/@refreshMenuItem/@listeners/@refreshMenuSelection
          sname
          refreshMenuSelection
          stype
          Selection
          slabel
          refreshMenuSelection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          refreshMenuSelection
            @/@outlineTree/@popMenu/@refreshMenuItem/@listeners/@refreshMenuSelection/@GroovyAction
            sname
            GroovyAction
            slabel
            GroovyAction
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;

import xworker.swt.util.XWorkerTreeUtil;

//清除当前的缓存
if(actionContext.get("dataCache") != null){
    dataCache.clear();
}

def treeItem = innerOutline.getSelection()[0];
def thing = treeItem.getData();
thing = world.getThing(thing.metadata.path);
currentThing = thing;

treeItem.setData(thing);
//treeItem.setToolTip(thing.metadata.objectName);
XWorkerTreeUtil.initItem(treeItem, thing, actionContext);
treeItem.removeAll();

actions.doAction("clearCache", ["thing":thing]);
for(child in thing.childs){
    initChild(treeItem, child, actions);
}

treeItem.setExpanded(true);
println "xxxxxxxxxxxxxxxxxxxxxxxx";
if (actionContxt.getObject("just_refresh_outline") != null && just_refresh_outline){
    return;
}

actions.doAction("openThing", [:]);

def initChild(treeItem, dataObj, actions){
    TreeItem item = new TreeItem(treeItem, SWT.NONE);
    item.setData(dataObj);
    XWorkerTreeUtil.initItem(item, dataObj, actionContext);
    //item.setToolTip(dataObj.thingName);
    actions.doAction("clearCache", ["thing":dataObj]);    
    
    for(child in dataObj.childs){
        initChild(item, child, actions);
    }
}
#$@text#$@
            sai_needGenerate
            false
            sai_rootThingXml
            true
            sai_promptContainsVars
            true
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
  @/@rightComposite
  sname
  mainComposite
  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
  slabel
  mainComposite
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.Widgets/@Composite
  sth_createIndex
  false
  sth_mark
  true
  sth_font
  "|10|1|#000000"
  sth_nodeColor
  DARK_MAGENTA
  sid
  rightComposite
    @/@rightComposite/@resources
    sname
    resources
    slabel
    resources
    sdescriptors
    xworker.swt.Widgets/@Resource
    sid
    resources
      @/@rightComposite/@resources/@titleBackGround
      sname
      titleBackGround
      slabel
      titleBackGround
      srgb
      #9CAEBD
      sdescriptors
      xworker.swt.util.Resource/@Color
      sid
      titleBackGround
      @/@rightComposite/@resources/@titleColor
      sname
      titleColor
      slabel
      titleColor
      srgb
      #FFFFFF
      sdescriptors
      xworker.swt.util.Resource/@Color
      sid
      titleColor
      @/@rightComposite/@resources/@titleFont
      sname
      titleFont
      slabel
      titleFont
      sdescriptors
      xworker.swt.util.Resource/@Font
      sid
      titleFont
      @/@rightComposite/@resources/@saveImage
      sname
      saveImage
      slabel
      saveImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/save.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      saveImage
      @/@rightComposite/@resources/@cutImage
      sname
      cutImage
      slabel
      cutImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/dataObjectChild.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      cutImage
      @/@rightComposite/@resources/@copyImage
      sname
      copyImage
      slabel
      copyImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/copy.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      copyImage
      @/@rightComposite/@resources/@pasteImage
      sname
      pasteImage
      slabel
      pasteImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/paste.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      pasteImage
      @/@rightComposite/@resources/@pasteAsChildImage
      sname
      pasteAsChildImage
      slabel
      pasteAsChildImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/pasteAsChild.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      pasteAsChildImage
      @/@rightComposite/@resources/@moveUpImage
      sname
      moveUpImage
      slabel
      moveUpImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/moveUp.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      moveUpImage
      @/@rightComposite/@resources/@moveDownImage
      sname
      moveDownImage
      slabel
      moveDownImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/moveDown.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      moveDownImage
      @/@rightComposite/@resources/@undoImage
      sname
      undoImage
      slabel
      undoImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/undo.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      undoImage
      @/@rightComposite/@resources/@redoImage
      sname
      redoImage
      slabel
      redoImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/redo.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      redoImage
      @/@rightComposite/@resources/@refreshImage
      sname
      refreshImage
      slabel
      refreshImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/refresh16_16.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      refreshImage
      @/@rightComposite/@resources/@deleteImage
      sname
      deleteImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/delete.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      deleteImage
      @/@rightComposite/@resources/@assitImage
      sname
      assitImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/assit.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      assitImage
      @/@rightComposite/@resources/@searchImage
      sname
      searchImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/search.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      searchImage
      @/@rightComposite/@resources/@runImage
      sname
      runImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/run24_24.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      runImage
      @/@rightComposite/@resources/@runBackImage
      sname
      runBackImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/run_back.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      runBackImage
      @/@rightComposite/@resources/@extendsImage
      sname
      extendsImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/extends.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      extendsImage
      @/@rightComposite/@resources/@extendsDeleteImage
      sname
      extendsDeleteImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/extends_delete.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      extendsDeleteImage
      @/@rightComposite/@resources/@descriptorImage
      sname
      descriptorImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/descriptor.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      descriptorImage
      @/@rightComposite/@resources/@descripotDeleteImage
      sname
      descriptorDeleteImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/descriptor_delete.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      descripotDeleteImage
      @/@rightComposite/@resources/@descriptorDeleteAllImage
      sname
      descriptorDeleteAllImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/descriptor_deleteall.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      descriptorDeleteAllImage
      @/@rightComposite/@resources/@descriptorExtendsImage
      sname
      descriptorExtendsImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/descriptorExtends.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      descriptorExtendsImage
      @/@rightComposite/@resources/@thingFlowImage
      sname
      thingFlowImage
      stype
      Image
      simageFile
      /xworker/swt/ide/images/thingFlow.GIF
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      thingFlowImage
      @/@rightComposite/@resources/@addChildImg
      sname
      addChildImg
      stype
      Image
      simageFile
      /xworker/swt/ide/images/normalFile_add.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sid
      addChildImg
      @/@rightComposite/@resources/@findImage
      sname
      findImage
      stype
      Image
      simageFile
      icons/find.png
      sdescriptors
      xworker.swt.util.Resource/@Image
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      findImage
      @/@rightComposite/@resources/@xmlImage
      sname
      xmlImage
      stype
      Image
      simageFile
      icons/file/xml.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      xmlImage
    @/@rightComposite/@contentComposite
    sname
    contentComposite
    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
    slabel
    contentComposite
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    ,xworker.swt.widgets.Composite
    sth_mark
    true
    sth_font
    "|10|1|#000000"
    sth_nodeColor
    DARK_GREEN
    sid
    contentComposite
      @/@rightComposite/@contentComposite/@contentCompositeGridLayout
      sname
      contentCompositeGridLayout
      snumColumns
      1
      smakeColumnsEqualWidth
      false
      smarginWidth
      5
      smarginHeight
      5
      smarginLeft
      0
      smarginTop
      0
      smarginRight
      0
      smarginBottom
      0
      shorizontalSpacing
      5
      sverticalSpacing
      5
      slabel
      contentCompositeGridLayout
      sdescriptors
      xworker.swt.Layouts/@GridLayout
      sid
      contentCompositeGridLayout
      @/@rightComposite/@contentComposite/@titleComposite
      sname
      titleComposite
      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
      slabel
      titleComposite
      scapture
      false
      senabled
      true
      sredraw
      true
      spack
      false
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Composite
      sid
      titleComposite
        @/@rightComposite/@contentComposite/@titleComposite/@projectTitleCompositeGridData
        sname
        titleTitleCompositeGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        slabel
        titleTitleCompositeGridData
        sdescriptors
        xworker.swt.Commons/@GridData
        sid
        projectTitleCompositeGridData
        @/@rightComposite/@contentComposite/@titleComposite/@projectTtielCompositeGridlayout
        sname
        titleCompositeGridlayout
        snumColumns
        1
        smakeColumnsEqualWidth
        false
        smarginWidth
        3
        smarginHeight
        3
        smarginLeft
        0
        smarginTop
        0
        smarginRight
        0
        smarginBottom
        0
        shorizontalSpacing
        0
        sverticalSpacing
        0
        slabel
        titleCompositeGridlayout
        sdescriptors
        xworker.swt.Layouts/@GridLayout
        sid
        projectTtielCompositeGridlayout
        @/@rightComposite/@contentComposite/@titleComposite/@background
        scolor
        titleBackGround
        sname
        background
        slabel
        background
        sdescriptors
        xworker.swt.Commons/@background
        sid
        background
        @/@rightComposite/@contentComposite/@titleComposite/@projectLabel
        sname
        titleLabel
        sBORDER
        false
        stype
        HORIZONTAL
        sshadow
        SHADOW_OUT
        salignment
        LEFT
        stext
        "标题"
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        slabel
        titleLabel
        sdescriptors
        xworker.swt.Widgets/@Label
        sid
        projectLabel
          @/@rightComposite/@contentComposite/@titleComposite/@projectLabel/@projectLabelGridData
          sname
          searchLabelGridData
          sstyle
          FILL_HORIZONTAL
          shorizontalIndent
          0
          swidth
          -1
          sheight
          -1
          shorizontalAlignment
          BEGINNING
          sverticalAlignment
          CENTER
          shorizontalSpan
          1
          sverticalSpan
          1
          sgrabExcessHorizontalSpace
          false
          sgrabExcessVerticalSpace
          false
          slabel
          searchLabelGridData
          sdescriptors
          xworker.swt.Commons/@GridData
          sid
          projectLabelGridData
          @/@rightComposite/@contentComposite/@titleComposite/@projectLabel/@foreground
          scolor
          titleColor
          sname
          foreground
          slabel
          foreground
          sdescriptors
          xworker.swt.Commons/@foreground
          sid
          foreground
          @/@rightComposite/@contentComposite/@titleComposite/@projectLabel/@background
          scolor
          titleBackGround
          sname
          background
          slabel
          background
          sdescriptors
          xworker.swt.Commons/@background
          sid
          background
          @/@rightComposite/@contentComposite/@titleComposite/@projectLabel/@font
          sfont
          titleFont
          sname
          font
          slabel
          font
          sdescriptors
          xworker.swt.Commons/@font
          sid
          font
      @/@rightComposite/@contentComposite/@menuBarComposite
      sname
      menuBarComposite
      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
      slabel
      menuBarComposite
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Composite
      sid
      menuBarComposite
        @/@rightComposite/@contentComposite/@menuBarComposite/@menuBarComposite
        sname
        menuBarCompositeGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        slabel
        menuBarCompositeGridData
        sdescriptors
        xworker.swt.Commons/@GridData
        sid
        menuBarComposite
        @/@rightComposite/@contentComposite/@menuBarComposite/@menuBarcompositeFillLayout
        sname
        menuBarcompositeFillLayout
        stype
        SWT.VERTICAL
        slabel
        menuBarcompositeFillLayout
        sdescriptors
        xworker.swt.Layouts/@FillLayout
        sid
        menuBarcompositeFillLayout
        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar
        sname
        coolBar
        stype
        HORIZONTAL
        sBORDER
        false
        sFLAT
        true
        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
        slabel
        coolBar
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@CoolBar
        sth_createIndex
        false
        sth_mark
        true
        sth_font
        "|10|1|#000000"
        sth_nodeColor
        DARK_RED
        sid
        coolBar
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@menuCoolItem
          sname
          menuCoolItem
          sDROP_DOWN
          false
          slabel
          menuCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          menuCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@menuCoolItem/@toolBar
            sname
            toolBar
            stype
            HORIZONTAL
            sFLAT
            true
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            slabel
            toolBar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            toolBar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@menuCoolItem/@toolBar/@test
              sname
              test
              stype
              PUSH
              stext
              " "
              senabled
              true
              slabel
              test
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              test
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem
          sname
          buttonsCoolItem
          sDROP_DOWN
          false
          slabel
          buttonsCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          buttonsCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar
            sname
            buttonsToolbar
            stype
            HORIZONTAL
            sFLAT
            false
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            scapture
            false
            senabled
            true
            sredraw
            true
            svisible
            true
            slabel
            buttonsToolbar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            buttonsToolbar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@okItem
              sname
              okItem
              stype
              PUSH
              simage
              saveImage
              stoolTiptext
              res:res.w_exp:menuItemSave:保存
              senabled
              true
              slabel
              okItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              okItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@okItem/@753
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                753
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@okItem/@753/@okButtonSelection
                  sname
                  okButtonSelection
                  stype
                  Selection
                  sref
                  actions:save
                  slabel
                  okButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  okButtonSelection
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@deleteItem
              sname
              deleteItem
              stype
              PUSH
              simage
              deleteImage
              stoolTiptext
              res:res.w_exp:delete:删除
              senabled
              true
              slabel
              deleteItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              deleteItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@deleteItem/@894
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                894
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@deleteItem/@894/@deleteButtonSelection
                  sname
                  deleteButtonSelection
                  stype
                  Selection
                  sref
                  actions:nodeDelete
                  slabel
                  deleteButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  deleteButtonSelection
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveUpItem
              sname
              moveUpItem
              stype
              PUSH
              simage
              moveUpImage
              stoolTiptext
              res:res.w_exp:moveUpNode:节点上移
              senabled
              true
              slabel
              moveUpItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              moveUpItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveUpItem/@939
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                939
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveUpItem/@939/@moveUpButtonSelection
                  sname
                  moveUpButtonSelection
                  stype
                  Selection
                  sref
                  actions:nodeMoveUp
                  slabel
                  moveUpButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  moveUpButtonSelection
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveDownItem
              sname
              moveDownItem
              stype
              PUSH
              simage
              moveDownImage
              stoolTiptext
              res:res.w_exp:moveDownNode:节点下移
              senabled
              true
              slabel
              moveDownItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              moveDownItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveDownItem/@984
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                984
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@moveDownItem/@984/@moveDownButtonSelection
                  sname
                  moveDownButtonSelection
                  stype
                  Selection
                  sref
                  actions:nodeMoveDown
                  slabel
                  moveDownButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  moveDownButtonSelection
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@searchItem
              sname
              searchItem
              stype
              PUSH
              simage
              searchImage
              stoolTiptext
              res:res.w_exp:searchAndReplace:查找替换
              senabled
              true
              slabel
              searchItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              searchItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@searchItem/@1074
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                1074
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@searchItem/@1074/@fastLocateSeelction
                  sname
                  fastLocateSeelction
                  stype
                  Selection
                  slabel
                  fastLocateSeelction
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  fastLocateSeelction
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@searchItem/@1074/@fastLocateSeelction/@FastLocateCode
                    sname
                    FastLocateCode
                    sthrowException
                    false
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    fastLocateCode
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.ActionContext;

ActionContext context = new ActionContext();
context.put("parent", coolBar.getShell());
context.put("parentContext", actionContext);
context.put("thing", currentThing.getRoot());
context.put("currentThing", currentThing);

def templateShellObj = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.FastLocateDialog/@shell");
def templateShell = templateShellObj.doAction("create", context);

templateShell.open();
#$@text#$@
                    sattributeTemplate
                    false
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    FastLocateCode
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@editModelItem
              sname
              editModelItem
              stype
              PUSH
              simage
              xmlImage
              stoolTiptext
              res:res.w_exp:changeEditMode:改变编辑模式
              senabled
              true
              slabel
              editModelItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              editModelItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@editModelItem/@listeners
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                listeners
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@buttonsCoolItem/@buttonsToolbar/@editModelItem/@listeners/@editModelItemSelection
                  sname
                  editModelItemSelection
                  stype
                  Selection
                  sref
                  actions:editorChangeType
                  slabel
                  editModelItemSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  editModelItemSelection
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem
          sname
          assistCoolItem
          sDROP_DOWN
          false
          slabel
          assistCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          assistCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar
            sname
            assitCoolBar
            stype
            HORIZONTAL
            sFLAT
            false
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            slabel
            assitCoolBar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            assitCoolBar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@editDescButton
              sname
              editDescButtonItem
              stype
              PUSH
              simage
              descriptorExtendsImage
              stoolTiptext
              res:res.w_exp:viewDescriptorAndExtend:浏览描述和继承
              senabled
              true
              slabel
              editDescButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              editDescButton
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@editDescButton/@listeners
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                listeners
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@editDescButton/@listeners/@editDescItemSelection
                  sname
                  editDescItemSelection
                  stype
                  Selection
                  slabel
                  editDescItemSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  editDescItemSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@editDescButton/@listeners/@editDescItemSelection/@GroovyAction
                    sname
                    GroovyAction
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    editDescItemSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.ActionContext;

ActionContext context = new ActionContext();
context.put("explorerActions", explorerActions);
context.put("thing", currentThing);
context.put("parent", coolBar.getShell());

def shellThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.DesAndExtendsDialog/@shell");
def shellObj = shellThing.doAction("create", context);
context.actions.doAction("setThing");

shellObj.open();
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@templateItem
              sname
              assistorItem
              stype
              PUSH
              simage
              assitImage
              stoolTiptext
              res:res.w_exp:assit:辅助
              senabled
              true
              slabel
              assistorItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              templateItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@templateItem/@1029
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                1029
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@templateItem/@1029/@templateButtonSelection
                  sname
                  assistorItemSelection
                  stype
                  Selection
                  slabel
                  templateButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  templateButtonSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@templateItem/@1029/@templateButtonSelection/@openAssistor
                    sname
                    openAssistor
                    sexpression
                    @xworker.command.CommandAssistor@open()
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.Actions/@Ongl
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    openAssistor
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@highlightItem
              sname
              highlightItem
              stype
              PUSH
              simage
              icons/flag_green.png
              stoolTiptext
              lang:d=设置或取消当前节点为重点节点。&en=Set or cancel the current node as the highlight node.
              senabled
              true
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              highlightItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@highlightItem/@939
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                939
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@assistCoolItem/@assitCoolBar/@highlightItem/@939/@moveUpButtonSelection
                  sname
                  highlightItemSelection
                  stype
                  Selection
                  sref
                  actions:nodeHighlight
                  sexceptionDialog
                  false
                  slabel
                  moveUpButtonSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  moveUpButtonSelection
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem
          sname
          descButtonCoolItem
          sDROP_DOWN
          false
          slabel
          descButtonCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          descButtonCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar
            sname
            descButtonToolBar
            stype
            HORIZONTAL
            sFLAT
            false
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            slabel
            descButtonToolBar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            descButtonToolBar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem
              sname
              descComboItem
              stype
              SEPARATOR
              slabel
              descComboItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              descComboItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem/@control
                sname
                control
                slabel
                control
                sdescriptors
                xworker.swt.widgets.ToolBar/@ToolItem/@control
                sid
                control
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem/@control/@160
                  sname
                  descriptorsCombo
                  stype
                  DROP_DOWN
                  sREAD_ONLY
                  true
                  scapture
                  false
                  senabled
                  true
                  sredraw
                  true
                  stoolTipText
                  所属类列表
                  svisible
                  true
                  slabel
                  descriptorsCombo
                  sdescriptors
                  xworker.swt.Widgets/@Combo
                  sid
                  160
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem/@control/@160/@895
                    sname
                    listeners
                    slabel
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sid
                    895
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem/@control/@160/@895/@descriptSelection
                      sname
                      descriptSelection
                      stype
                      Selection
                      slabel
                      descriptSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      descriptSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@descComboItem/@control/@160/@895/@descriptSelection/@GroovyAction
                        sname
                        GroovyAction
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        descriptComboSelection
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.listeners.SwtMenuListener;
import xworker.swt.util.SwtUtils;
import xworker.swt.events.SwtListener;
import org.xmeta.util.UtilString;
import xworker.swt.form.ThingDescriptorForm;
import xworker.lang.util.XWorkerUtils;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Composite;

//long start = System.currentTimeMillis();
//取当前选择的描述
int index = descriptorsCombo.getSelectionIndex();
def objStruct = descriptorsCombo.getData().get(index);
thing = currentThing;
structureThing = objStruct;

//标题的提示和帮助
def webUrl = XWorkerUtils.getThingDescUrl(objStruct);
if(actionContext.get("outlineBrowser") != null &&  !outlineBrowser.isDisposed()){
    outlineBrowser.setUrl(webUrl);
}
actions.doAction("initOutlineBrowser", actionContext, ["descriptor": objStruct, "thing": currentThing]);

if(titleComposite != null && !titleComposite.isDisposed()){
    titleLabel.setText(thing.metadata.label + "－" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
    
    String toolTipText = "<b><u><a href=\"" + webUrl + 
        "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + objStruct.getMetadata().getPath() + "\">" +
        objStruct.getMetadata().getName() + "</a></u></b><br/><br/>";    			    
        
    //log.info(    toolTipText);
    if(objStruct.metadata.description != null){
        String ttText = objStruct.metadata.description;
        titleLabel.setData("toolTip", toolTipText + ttText);
    }else{
        titleLabel.setData("toolTip", toolTipText);
    }
}

if(menuBarComposite != null && !menuBarComposite.isDisposed()){
    //初始化菜单
    def menus = [];
    SwtMenuListener swtMenu = SwtMenuListener.getInstance();
    if(objStruct != null){
        String[] paths = thing.getDescriptors()[0].metadata.getPaths();
        menus = swtMenu.getMenu(thing, paths, "data");
    }else{        	
        String strFullPath = (structurePath == null || "".equals(structurePath.trim())) ? descriptors : (descriptors + ":" + structurePath);
        menus = swtMenu.getMenu(thing, [strFullPath], "data");
    }
    
    def toolItemListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@toolBarItemSelection");
    def disposeListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@dispose");
    def menuListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@menuSelection");
    
    for(item in toolBar.getItems()){
        item.dispose();
    }
    
    for(menu in menus){
        ToolItem item = new ToolItem(toolBar, SWT.PUSH);
        //println item;
        item.setText(menu.metadata.label);
        item.addListener(SWT.Selection, new SwtListener(toolItemListenerObject, actionContext));
        item.addListener(SWT.Dispose, new SwtListener(disposeListenerObject, actionContext));
        
        String attachUrl = "&thingName=" + thing.metadata.path + "&descriptors=";
        //创建菜单
        Menu amenu = new Menu(toolBar.getShell(), SWT.POP_UP);
        //item.setMenu(amenu);
        for(child in menu.getChilds()){
            initMenuItem(amenu, child, attachUrl, menuListenerObject, actionContext);
        }    
        item.setData("menu", amenu);
    }
}

//log.info("初始化菜单：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();
    
//初始化编辑内容窗体
Thing structForm = new Thing();
structForm.put("descriptors", "xworker.swt.xworker.ThingDescritporForm");
structForm.name = "contentForm";
structForm.descriptorPath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

for(child in structComposite.getChildren()){
    child.dispose();
    if(!SwtUtils.isRWT()){
        structComposite.removeControl(child);
    }
}

//建立新的上下文
ActionContext newContext = new ActionContext();
newContext.setLabel("Thing Editor descriptor");
newContext.put("parentContext", actionContext);
newContext.put("explorerActions", explorerActions);
newContext.put("explorerContext", explorerContext);
newContext.put("thingContext", actionContext);
newContext.put("parent", structComposite);
newContext.put("thing", currentThing);
newContext.put("defaultSelection", okButtonSelection);
newContext.put("utilBrowser", utilBrowser);
newContext.put("modifyListener", actionContext.get("modifyListener"));
newContext.put("editModel", actionContext.get("editModel"));
newContext.put("editActions", actions);
if(actionContext.get("modifyListener")){
    modifyListener.setEnable(false);
}    
newContext.put("dataCache", dataCache);

def formComposite = ThingDescriptorForm.createThingSingleColumnForm(currentThing, objStruct, "okButtonSelection", "modifyListener", (Composite) structComposite, newContext);
if(actionContext.get("modifyListener") != null){
    modifyListener.setEnable(true);
}    

currentModel = newContext.model;
currentModelContext = newContext;

structComposite.layout();

if(contentEditCompositeStackLayout.topControl != contentComposite){
    contentEditCompositeStackLayout.topControl = contentComposite
    contentEditComposite.layout();
}

//切换到默认编辑方式
def defaultEditor = structureThing.getString("defaultEditor");
if(defaultEditor == "xml"){
    actions.doAction("showXmlEditor");
}else if(defaultEditor == "guide"){
    actions.doAction("showGuideEditor");
}
//log.info("初始化编辑表单：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();

//编辑缓存
def data = dataCache.get(currentThing.metadata.path)
if(data != null){
    def attrs = [:];
    attrs.putAll(currentThing.getAttributes());
    attrs.putAll(data.data);
    currentModelContext.put("thingAttributes", attrs);
    currentModel.doAction("setValue", currentModelContext);
}

//log.info("初始化编辑缓存：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();
//log.info("xxxx1");

//是否显示菜单工具栏
//if(structureThing.get)
def initMenuItem(parent, menuData, attachUrl, menuListenerObject, swtActionContext){
    int style = SWT.PUSH;
    if(menuData.childs.size() > 0){
        style = SWT.CASCADE;
    }else if(menuData.getBoolean("isSplit")){
        style = SWT.SEPARATOR;
    }
        
    MenuItem mitem = new MenuItem(parent, style);
    mitem.setData("menu", menuData);
    if(menuData.accelerator != null && menuData.accelerator != ""){
        mitem.setText(menuData.metadata.label + "\t" + menuData.accelerator);        
        mitem.setAccelerator(SwtUtil.getAccelerator(menuData.accelerator));
    }else{
        mitem.setText(menuData.metadata.label);
    }
    mitem.addListener(SWT.Selection, new SwtListener(menuListenerObject, swtActionContext));
    
    String url = menuData.getString("url");
    if(url != null && url != ""){
        //if(menuData.getBoolean("attachParam")){
        //    mitem.setData("url", menuData.getString("url") + attachUrl);
        //}else{
        mitem.setData("url", menuData.getString("url"));
        //}
    }else{
        def menuActions = menuData.get("actions@0");
        if(menuActions != null && menuActions.childs.size() > 0){
            mitem.setData("url", menuActions.childs[0].metadata.path);
        }
    }
    
    def childMenus = menuData.get("Menu@");
    if(childMenus.size() > 0){
        Menu subMenu = new Menu(mitem); 
        mitem.setMenu(subMenu);   
        for(child in childMenus){                     
            initMenuItem(subMenu, child, attachUrl, menuListenerObject, swtActionContext);        
        }
    }
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        GroovyAction
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@addDescButtonItem
              sname
              addDescButtonItem
              stype
              PUSH
              simage
              descriptorImage
              stoolTiptext
              lang:d=添加描述者(类)&en=Add descriptor(class)
              senabled
              true
              slabel
              addDescButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              addDescButtonItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@addDescButtonItem/@2351
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                2351
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@addDescButtonItem/@2351/@addDesSelection
                  sname
                  addDesSelection
                  stype
                  Selection
                  slabel
                  addDesSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  addDesSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@addDescButtonItem/@2351/@addDesSelection/@GroovyAction
                    sname
                    GroovyAction
                    sthrowException
                    false
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    addDesSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.util.SwtDialog;

def shell = contentComposite.getShell();
Thing dialogObject = world.getThing("xworker.swt.ide.worldexplorer.swt.tools.ThingSelector/@shell");

ActionContext newContext = new ActionContext();
newContext.put("parent", shell);
def newShell = dialogObject.doAction("create", newContext);

SwtDialog dialog = new SwtDialog(shell, newShell, newContext);
def result = dialog.open();
if(result != null){
    //descriptorText.setText(result);
    Thing descriptor = world.getThing(result);
    if(descriptor != null){
        currentThing.addDescriptor(0, descriptor);
        currentThing.save();
        thingEntry.getThing();
        
        int index = descriptorsCombo.getSelectionIndex();
        def objStruct = descriptorsCombo.getData().get(index);
        def descriptors = currentThing.getDescriptors();
        descriptorsCombo.removeAll();
        descriptorsCombo.setData(descriptors);
        
        for(descriptort in descriptors){
            descriptorsCombo.add(descriptort.metadata.label);
        }
        index = 0;
        for(descriptort in descriptors){
            if(objStruct.metadata.path == descriptort.metadata.path){
                descriptorsCombo.select(index);
                break;
            }
    
            index ++;
        }
    }
}
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem
              sname
              removeDesButtonItem
              stype
              PUSH
              simage
              descriptorDeleteImage
              stoolTiptext
              lang:d=移除描述者（类)&en=Remove descriptor(class)
              senabled
              true
              slabel
              removeDesButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              removeDesButtonItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem/@2401
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                2401
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem/@2401/@removeSelection
                  sname
                  removeSelection
                  stype
                  Selection
                  slabel
                  removeSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  removeSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem/@2401/@removeSelection/@removeDesc
                    sname
                    removeDesc
                    sshell
                    ognl:contentComposite.getShell()
                    sicon
                    ICON_QUESTION
                    sbuttons
                    OK | CANCEL
                    stitle
                    lang:d=移除描述者&en=Remove Descriptor
                    smessage
                    lang:d=确实要删除选中的描述么？&en=Are you sure to remove selected descriptor?
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.swt.actions.MessageBoxActions/@MessageBox
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    removeDesc
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem/@2401/@removeSelection/@removeDesc/@actions
                      sname
                      actions
                      sdescriptors
                      xworker.lang.actions.SelfAction/@actions1
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      actions
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDesButtonItem/@2401/@removeSelection/@removeDesc/@actions/@ok
                        sname
                        ok
                        sthrowException
                        true
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        removeDescOK
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.util.UtilString;

int dindex = descriptorsCombo.getSelectionIndex();
def des = descriptorsCombo.getData().get(dindex);

if(currentThing != null){
    currentThing.removeDescriptor(des);
    currentThing.save();
    thingEntry.getThing();
    
    int index = descriptorsCombo.getSelectionIndex();
    def objStruct = descriptorsCombo.getData().get(index);
    descriptors = currentThing.getDescriptors();
    descriptorsCombo.removeAll();
    descriptorsCombo.setData(descriptors);
    
    for(descriptor in descriptors){
        descriptorsCombo.add(descriptor.metadata.label);
    }
            
    descriptorsCombo.select(0);
    descriptSelection.handleEvent(null);
    //dataCenter.runScript("xworker.ide.config.webactions.editor.swt.editors.ConentEditorHead/@shell/@mainComposite/@desComposite/@descriptorsCombo/@listeners/@descriptSelection/@script", binding);
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        ok
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDACButtonItem
              sname
              removeDACButtonItem
              stype
              PUSH
              simage
              descriptorDeleteAllImage
              stoolTiptext
              lang:d=删除类及其定义的子事物&en=Remove descriptor(class) ans the childs which defined by descriptor(class)
              senabled
              true
              slabel
              removeDACButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              removeDACButtonItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDACButtonItem/@2444
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                2444
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@descButtonCoolItem/@descButtonToolBar/@removeDACButtonItem/@2444/@removeAllSelection
                  sname
                  removeAllSelection
                  stype
                  Selection
                  sref
                  removeSelection
                  slabel
                  removeAllSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  removeAllSelection
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem
          sname
          extButtonCoolItem
          sDROP_DOWN
          false
          slabel
          extButtonCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          extButtonCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar
            sname
            addExtToolbar
            stype
            HORIZONTAL
            sFLAT
            false
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            slabel
            addExtToolbar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            addExtToolbar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@extComboItem
              sname
              extComboItem
              stype
              SEPARATOR
              slabel
              extComboItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              extComboItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@extComboItem/@control
                sname
                control
                slabel
                control
                sdescriptors
                xworker.swt.widgets.ToolBar/@ToolItem/@control
                sid
                control
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@extComboItem/@control/@3110
                  sname
                  extendsCombo
                  stype
                  DROP_DOWN
                  sREAD_ONLY
                  true
                  scapture
                  false
                  senabled
                  true
                  sredraw
                  true
                  stoolTipText
                  继承者列表
                  svisible
                  true
                  slabel
                  extendsCombo
                  sdescriptors
                  xworker.swt.Widgets/@Combo
                  sid
                  3110
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@addExtButtonItem
              sname
              addExtButtonItem
              stype
              PUSH
              simage
              extendsImage
              stoolTiptext
              res:res.w_exp:addExtend:添加继承
              senabled
              true
              slabel
              addExtButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              addExtButtonItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@addExtButtonItem/@3064
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                3064
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@addExtButtonItem/@3064/@addExtendSelection
                  sname
                  addExtendSelection
                  stype
                  Selection
                  slabel
                  addExtendSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  addExtendSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@addExtButtonItem/@3064/@addExtendSelection/@GroovyAction
                    sname
                    GroovyAction
                    sthrowException
                    false
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    addExtendSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.util.SwtDialog;

def shell = contentComposite.getShell();
Thing dialogObject = world.getThing("xworker.swt.ide.worldexplorer.swt.tools.ThingSelector/@shell");

ActionContext newContext = new ActionContext();
newContext.put("parent", shell);
def newShell = dialogObject.doAction("create", newContext);

SwtDialog dialog = new SwtDialog(shell, newShell, newContext);
def result = dialog.open();
if(result != null){
    //descriptorText.setText(result);
    Thing extendd = world.getThing(result);
    if(extendd != null){
        currentThing.addExtend(-1, extendd);
        currentThing.save();
        thingEntry.getThing();

        extendsCombo.removeAll();   
        def textends = currentThing.getExtends();
        extendsCombo.setData(textends);
        for(extend in textends){
            extendsCombo.add(extend.metadata.label);
        }
    }
}
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem
              sname
              removeExtButtonItem
              stype
              PUSH
              simage
              extendsDeleteImage
              stoolTiptext
              res:res.w_exp:deleteExtend:删除继承
              senabled
              true
              slabel
              removeExtButtonItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              removeExtButtonItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem/@3080
                sname
                listeners
                slabel
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sid
                3080
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem/@3080/@removeExtendSelection
                  sname
                  removeExtendSelection
                  stype
                  Selection
                  slabel
                  removeExtendSelection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  removeExtendSelection
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem/@3080/@removeExtendSelection/@removeDesc
                    sname
                    removeDesc
                    sshell
                    ognl:contentComposite.getShell()
                    sicon
                    ICON_QUESTION
                    sbuttons
                    OK | CANCEL
                    stitle
                    lang:d=移除继承&en=Remove Extend
                    smessage
                    lang:d=确实要删除选中的继承么？&en=Are you sure to remove selected extend?
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.swt.actions.MessageBoxActions/@MessageBox
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    removeDesc
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem/@3080/@removeExtendSelection/@removeDesc/@actions
                      sname
                      actions
                      sdescriptors
                      xworker.lang.actions.SelfAction/@actions1
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      actions
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@extButtonCoolItem/@addExtToolbar/@removeExtButtonItem/@3080/@removeExtendSelection/@removeDesc/@actions/@ok
                        sname
                        ok
                        sthrowException
                        true
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        removeExtendSelectionOk
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.util.UtilString;

if(currentThing != null){
    int dindex = extendsCombo.getSelectionIndex();
    if(dindex == -1) return;
    
    def extendObj = extendsCombo.getData().get(dindex);
    currentThing.removeExtend(extendObj);
    currentThing.save();
    thingEntry.getThing();
    
    def textends = currentThing.getExtends();
    extendsCombo.setData(textends);
    extendsCombo.removeAll();
    for(extend in textends){
        extendsCombo.add(extend.metadata.label);
    }
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        ok
          @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem
          sname
          methodCoolItem
          sDROP_DOWN
          false
          slabel
          methodCoolItem
          sdescriptors
          xworker.swt.widgets.CoolBar/@CoolItem
          sid
          methodCoolItem
            @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar
            sname
            methodToolbar
            stype
            HORIZONTAL
            sFLAT
            false
            sWRAP
            false
            sBORDER
            false
            sSHADOW_OUT
            false
            sRIGHT
            false
            slabel
            methodToolbar
            sdescriptors
            xworker.swt.widgets.CoolBar/@CoolItem/@ToolBar
            sid
            methodToolbar
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem
              sname
              methodToolItem
              stype
              SEPARATOR
              slabel
              methodToolItem
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sid
              methodToolItem
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem/@control
                sname
                control
                slabel
                control
                sdescriptors
                xworker.swt.widgets.ToolBar/@ToolItem/@control
                sid
                control
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem/@control/@344
                  sname
                  methodsCombo
                  stype
                  DROP_DOWN
                  sREAD_ONLY
                  false
                  scapture
                  false
                  senabled
                  true
                  sredraw
                  true
                  stoolTipText
                  动作列表
                  svisible
                  true
                  slabel
                  methodsCombo
                  sdescriptors
                  xworker.swt.Widgets/@Combo
                  sid
                  344
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem/@control/@344/@listeners
                    sname
                    listeners
                    slabel
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sid
                    listeners
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem/@control/@344/@listeners/@methodsComboSelection
                      sname
                      methodsComboSelection
                      stype
                      Selection
                      slabel
                      methodsComboSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      methodsComboSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@methodToolItem/@control/@344/@listeners/@methodsComboSelection/@script
                        sname
                        script
                        sthrowException
                        true
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        methodsComboSelection
                        sdisableGlobalContext
                        false
                        scode
                        println(event.widget.getText());
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        script
              @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1
              sname
              runToolItem
              stype
              DROP_DOWN
              simage
              runImage
              stoolTiptext
              lang:d=执行&en=Execute
              senabled
              true
              sdescriptors
              xworker.swt.widgets.ToolBar/@ToolItem
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              runToolItem1
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu
                sname
                runToolItemMenu
                sstyle
                POP_UP
                sNO_RADIO_GROUP
                false
                salign
                LEFT_TO_RIGHT
                svisible
                true
                senabled
                true
                sdescriptors
                xworker.swt.Widgets/@Menu
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                runToolItemMenu
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem
                  sname
                  executeMenuItem
                  stext
                  lang:d=执行&en=Execute
                  sselected
                  false
                  senabled
                  true
                  sdescriptors
                  xworker.swt.widgets.Menu/@MenuItem
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  MenuItem
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem/@451
                    sname
                    listeners
                    slabel
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sid
                    451
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem/@451/@runButtonSelection
                      sname
                      runButtonSelection
                      stype
                      Selection
                      slabel
                      runButtonSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      runButtonSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem/@451/@runButtonSelection/@GroovyAction
                        sname
                        runButtonSelection
                        sisSynchronized
                        false
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        runButtonSelection
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

def ac = new ActionContext();
ac.put("parentContext", actionContext);

if(methodsCombo.getText().trim() != ""){
    String method = methodsCombo.getText();
    def obj = currentThing.doAction(method, ac);
    if(obj instanceof Thing){
        println obj.doAction("toXml");
    }else{
        println obj;
    }
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        GroovyAction
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem
                  sname
                  executeBackgroundMenuItem
                  stext
                  lang:d=后台执行&en=Run In New Thread
                  sselected
                  false
                  senabled
                  true
                  sdescriptors
                  xworker.swt.widgets.Menu/@MenuItem
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  executeBackgroundMenuItem
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem/@listeners
                    sname
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    listeners
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem/@listeners/@runBackButtonSelection
                      sname
                      runBackButtonSelection
                      stype
                      Selection
                      slabel
                      runBackButtonSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      runBackButtonSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem/@listeners/@runBackButtonSelection/@GroovyAction
                        sname
                        runBackButtonSelection
                        sisSynchronized
                        false
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        runBackButtonSelection
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

if(methodsCombo.getText().trim() != ""){
    def acContext = actionContext;
    String method = methodsCombo.getText();
    new Thread([
        run : {
            def ac = new ActionContext();
            ac.put("parentContext", actionContext);
            def obj = currentThing.doAction(method, acContext);
            if(obj instanceof Thing){
                println obj.doAction("toXml");
            }else{
                println obj;
            }
            }] as Runnable).start();    
    
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        GroovyAction
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem1
                  sname
                  executeTraceMenuItem
                  stext
                  lang:d=执行(Trace)&en=Execute(Trace)
                  sselected
                  false
                  senabled
                  true
                  sdescriptors
                  xworker.swt.widgets.Menu/@MenuItem
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  MenuItem1
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem1/@451
                    sname
                    listeners
                    slabel
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sid
                    451
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem1/@451/@runButtonSelection
                      sname
                      runButtonSelection
                      stype
                      Selection
                      slabel
                      runButtonSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      runButtonSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@MenuItem1/@451/@runButtonSelection/@GroovyAction
                        sname
                        runTraceButtonSelection
                        sisSynchronized
                        false
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        runTraceButtonSelection
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

def ac = new ActionContext();
ac.put("parentContext", actionContext);
if(methodsCombo.getText().trim() != ""){
    actionContext.peek().setContextThing(new Thing("xworker.lang.context.DebugContext"));
    String method = methodsCombo.getText();
    def obj = currentThing.doAction(method, ac);
    if(obj instanceof Thing){
        println obj.doAction("toXml");
    }else{
        println obj;
    }
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        GroovyAction
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem1
                  sname
                  executeTraceBackgroundMenuItem
                  stext
                  lang:d=后台执行(Trace)&en=Run In New Thread(Trace)
                  sselected
                  false
                  senabled
                  true
                  sdescriptors
                  xworker.swt.widgets.Menu/@MenuItem
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  executeBackgroundMenuItem1
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem1/@listeners
                    sname
                    listeners
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    listeners
                      @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem1/@listeners/@runBackButtonSelection
                      sname
                      runBackButtonSelection
                      stype
                      Selection
                      slabel
                      runBackButtonSelection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sid
                      runBackButtonSelection
                        @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@runToolItemMenu/@executeBackgroundMenuItem1/@listeners/@runBackButtonSelection/@GroovyAction
                        sname
                        executeTraceBackgroundMenuItem
                        sisSynchronized
                        false
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                        smethodName
                        executeTraceBackgroundMenuItem
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

if(methodsCombo.getText().trim() != ""){
    def acContext = actionContext;
    String method = methodsCombo.getText();
    new Thread([
        run : {
            def ac = new ActionContext();
            ac.put("parentContext", acContext);
            newContext.peek().setContextThing(new Thing("xworker.lang.context.DebugContext"));
            def obj = currentThing.doAction(method, newContext);
            if(obj instanceof Thing){
                println obj.doAction("toXml");
            }else{
                println obj;
            }
            }] as Runnable).start();    
    
}
#$@text#$@
                        sattributeTemplate
                        false
                        sinterpretationType
                        Action
                        svarScope
                        Global
                        screateLocalVarScope
                        false
                        ssaveReturn
                        false
                        sdebugLog
                        false
                        sdescriptors
                        xworker.lang.actions.JavaAction
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        GroovyAction
                @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@listeners
                sname
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                listeners
                  @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@listeners/@runToolItemListener
                  sname
                  runToolItemListener
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  runToolItemListener
                    @/@rightComposite/@contentComposite/@menuBarComposite/@coolBar/@methodCoolItem/@methodToolbar/@runToolItem1/@listeners/@runToolItemListener/@ShowMenuByEventWidgets
                    sname
                    ShowMenuByEventWidgets
                    smenuVar
                    runToolItemMenu
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.swt.actions.MenuActions/@ShowMenuAlignControl
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    ShowMenuByEventWidgets
        @/@rightComposite/@contentComposite/@menuBarComposite/@ThingEditorFormUI
        sname
        MenuBarUI
        slabel
        菜单
        scommandIndex
        xworker.ide.worldexplorer.swt.help.commander.ThingEditorMenu
        spriority
        0
        sen_label
        Menu
        sen_group
        Thing Editor
        sdescriptors
        xworker.swt.Widgets/@InteractiveUI
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sgroup
        模型编辑器
        sth_fileMonitor
        false
        sth_deprecated
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        snotXmlAttribute
        false
        sjson_isArray
        false
        sid
        ThingEditorFormUI
      @/@rightComposite/@contentComposite/@splitLabel1
      sname
      splitLabel1
      sBORDER
      false
      sstyle
      SEPARATOR
      stype
      HORIZONTAL
      sshadow
      SHADOW_OUT
      salignment
      LEFT
      stext
      ""
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      slabel
      splitLabel1
      sdescriptors
      xworker.swt.Widgets/@Label
      sid
      splitLabel1
        @/@rightComposite/@contentComposite/@splitLabel1/@spliteLabel1GridData
        sname
        spliteLabel1GridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        slabel
        spliteLabel1GridData
        sdescriptors
        xworker.swt.Commons/@GridData
        sid
        spliteLabel1GridData
      @/@rightComposite/@contentComposite/@mainSashForm
      sname
      mainSashForm
      sstyle
      HORIZONTAL
      sSMOOTH
      false
      sweights
      30,70
      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
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@SashForm
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      mainSashForm
        @/@rightComposite/@contentComposite/@mainSashForm/@strcutCompositeGridData
        sname
        mainSashGridData
        sstyle
        FILL_BOTH
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        slabel
        strcutCompositeGridData
        sdescriptors
        xworker.swt.Commons/@GridData
        sid
        strcutCompositeGridData
        @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline
        sname
        innerOutline
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        false
        sHIDE_SELECTION
        false
        sBORDER
        false
        slineVisible
        false
        smultipleColumns
        true
        sheaderVisible
        false
        ssortIndicator
        false
        smoveableColumns
        false
        sheadImages
        false
        ssubImages
        false
        scheckSelection
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        slabel
        innerOutline
        sdescriptors
        xworker.swt.Widgets/@Tree
        sth_mark
        true
        sid
        innerOutline
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners
          sname
          Listeners
          slabel
          Listeners
          sdescriptors
          xworker.swt.widgets.Widget/@Listeners
          sid
          Listeners
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners/@innerOutlineSelectionListener
            sname
            innerOutlineSelectionListener
            stype
            Selection
            sref
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@actions/@innerOutlineSelection
            slabel
            innerOutlineSelectionListener
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sid
            innerOutlineSelectionListener
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners/@innerOutlimeExpandListener
            sname
            innerOutlimeExpandListener
            stype
            Expand
            sref
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@actions/@innerOutlineExpand
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            innerOutlimeExpandListener
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners/@innerOutlineCollapseListener
            sname
            innerOutlineCollapseListener
            stype
            Collapse
            sref
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@actions/@innerOutlineCollapse
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_mark
            false
            sid
            innerOutlineCollapseListener
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners/@innerOutlineMouseMove
            sname
            innerOutlineMouseMove
            stype
            MouseMove
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            innerOutlineMouseMove
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@Listeners/@innerOutlineMouseMove/@JavaAction
              sname
              JavaAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.OutlineTreeMoveListener
              smethodName
              treeMouseMoved
              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
              JavaAction
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@interactiveUI
          sname
          innerOutlineInteractiveUI
          slabel
          模型概要树
          spriority
          0
          sen_label
          Thing Outline
          sen_group
          Thing Editor
          sdescriptors
          xworker.swt.Widgets/@InteractiveUI
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_noThingRegistViewer
          false
          sgroup
          模型编辑器
          sth_fileMonitor
          false
          sth_deprecated
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          snotXmlAttribute
          false
          sjson_isArray
          false
          sid
          interactiveUI
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@interactiveUI/@actions
            sname
            actions
            sdescriptors
            xworker.swt.xwidgets.InteractiveUI/@actions1
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            actions
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@interactiveUI/@actions/@getCommandIndex
              sname
              getCommandIndex
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              getCommandIndex
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import org.xmeta.Thing;

def path = currentThing.getMetadata().getPath();
def key = "__commandAssistorThing__";
def keyRegist = "__commandAssistorThing__registThing__";
//避免节点重复点击，根节点例外
if(_g.get(key) == path){
    //println(path);
    //println(_g.get(key));
    //println("thing editor interativeUI is current thng");    
    def registThng = _g.get(keyRegist);    
    if(registThng != null){
        return registThng;
    }
}

//使用新的临时的事物伪装当前正在编辑的事物
//def thing = world.getThing("xworker.ide.worldexplorer.swt.dataExplorerParts.ThingCommandIndexRoot");
//thing = thing.detach();
def thing = new Thing();
def thingPath = thing.getMetadata().getPath();
thing.set("descriptors", currentThing.getString("descriptors"));
//默认不查询描述者，所以放到继承里
def descs = currentThing.getStringBlankAsNull("descriptors");
def exts = path + ",xworker.ide.worldexplorer.swt.dataExplorerParts.ThingCommandIndexRoot";
if(descs != null){
    exts = exts + "," + descs;
}
thing.set("extends", exts);
thing.set("label", currentThing.getMetadata().getLabel() + ":");
thing.set("thingPath", thingPath);
def description = thing.getDescriptor().getMetadata().getDescription();
//println(description);
thing.set("description", description);
//thing.getMetadata().setPath(path);

_g.put(key, path);
_g.put(keyRegist, thingPath);
//println("interactive ok");
//println(thingPath);
return thingPath;
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              getCommandIndex
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@interactiveUI/@actions/@initCommand
              sname
              initCommand
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              assistorInitCommand
              sdisableGlobalContext
              false
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              initCommand
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu
          sname
          popMenu
          sstyle
          DROP_DOWN
          sNO_RADIO_GROUP
          false
          salign
          LEFT_TO_RIGHT
          svisible
          true
          senabled
          true
          slabel
          popMenu
          sdescriptors
          xworker.swt.Widgets/@Menu
          sid
          popMenu
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath
            sname
            copyPath
            stext
            lang:d=拷贝路径&en=Copy Path
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            copyPath
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            copyPath
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners/@copyPathSelection
                sname
                copyPathSelection
                stype
                Selection
                slabel
                copyPathSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                copyPathSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners/@copyPathSelection/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  copyPathSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import xworker.swt.util.SwtUtils;

if(SwtUtils.isRWT()){
    def treeItem = innerOutline.getSelection()[0];
    String plainText = treeItem.getData().metadata.path;
    copyRWT(actionContext, "path", plainText);
}else{
    copyNormal(actionContext);
}
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
                    @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners/@copyPathSelection/@GroovyAction/@ActionDefined
                    sname
                    ActionDefined
                    sdescriptors
                    xworker.lang.actions.Inout/@ActionDefined
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    ActionDefined
                      @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners/@copyPathSelection/@GroovyAction/@ActionDefined/@copyNormal
                      sname
                      copyNormal
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                      smethodName
                      copyPathSelectionCopyNormal
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.RTFTransfer;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;

def treeItem = innerOutline.getSelection()[0];
Clipboard clipboard = new Clipboard(innerOutline.getDisplay());
String plainText = treeItem.getData().metadata.path;
TextTransfer textTransfer = TextTransfer.getInstance();
clipboard.setContents([plainText] as String[], [textTransfer] as Transfer[]);
clipboard.dispose();
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      copyNormal
                      @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyPath/@listeners/@copyPathSelection/@GroovyAction/@ActionDefined/@copyRWT1
                      sname
                      copyRWT
                      stitle
                      lang:d=拷贝路径&en=Copy Path
                      stext
                      var:path
                      sinterpretationType
                      Self
                      sattributeTemplate
                      false
                      schildsAttributeTemplate
                      false
                      svarScope
                      Local
                      sisSynchronized
                      false
                      sthrowException
                      true
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdisableGlobalContext
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.swt.actions.MessageBoxActions/@Prompt
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      copyRWT1
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@popSepartor1
            sname
            popSepartor1
            stext
            ""
            sstyle
            SEPARATOR
            slabel
            popSepartor1
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            popSepartor1
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveUpMenu
            sname
            moveUpMenu
            stext
            lang:d=节点上移&en=Move Up
            sselected
            false
            senabled
            true
            slabel
            moveUpMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            moveUpMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveUpMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveUpMenu/@listeners/@moveUpMenuSelection
                sname
                moveUpMenuSelection
                stype
                Selection
                sref
                actions:nodeMoveUp
                slabel
                moveUpMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                moveUpMenuSelection
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveDownMenu
            sname
            moveDownMenu
            stext
            lang:d=节点下移&en=Move Down
            sselected
            false
            senabled
            true
            slabel
            moveDownMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            moveDownMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveDownMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@moveDownMenu/@listeners/@moveDownMenuSelection
                sname
                moveDownMenuSelection
                stype
                Selection
                sref
                actions:nodeMoveDown
                slabel
                moveDownMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                moveDownMenuSelection
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@popSplit2
            sname
            popSplit2
            stext
            ""
            sstyle
            SEPARATOR
            slabel
            popSplit2
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            popSplit2
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@deleteMenu
            sname
            deleteMenu
            stext
            lang:d=删除&en=Delete
            sselected
            false
            senabled
            true
            slabel
            deleteMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            deleteMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@deleteMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@deleteMenu/@listeners/@deleteMenuSelection
                sname
                deleteMenuSelection
                stype
                Selection
                sref
                actions:nodeDelete
                slabel
                deleteMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                deleteMenuSelection
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@cutMenu
            sname
            cutMenu
            stext
            lang:d=剪切&en=Cut
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            cutMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            cutMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@cutMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@cutMenu/@listeners/@cutMenuListener
                sname
                cutMenuListener
                stype
                Selection
                slabel
                cutMenuListener
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                cutMenuListener
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@cutMenu/@listeners/@cutMenuListener/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  cutMenuListener
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
copyMenuSelection.handleEvent(null);
deleteMenuSelection.handleEvent(null);
#$@text#$@
                  sattributeTemplate
                  false
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyMenu
            sname
            copyMenu
            stext
            lang:d=复制&en=Copy
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            copyMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            copyMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyMenu/@listeners/@copyMenuSelection
                sname
                copyMenuSelection
                stype
                Selection
                slabel
                copyMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                copyMenuSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@copyMenu/@listeners/@copyMenuSelection/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  copyMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.xmeta.Thing;
import xworker.swt.ui.swt.Clipboard;

def treeItem = innerOutline.getSelection()[0];
Thing thing = treeItem.getData();
if(thing != null){
    Clipboard.add(thing.detach(false));
    thingEntry.getThing();
}
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteMenu
            sname
            pasteMenu
            stext
            lang:d=粘贴&en=Paste
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            pasteMenu
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            pasteMenu
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteMenu/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteMenu/@listeners/@pasteMenuSelection
                sname
                pasteMenuSelection
                stype
                Selection
                slabel
                pasteMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                pasteMenuSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteMenu/@listeners/@pasteMenuSelection/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  pasteMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import xworker.swt.ui.swt.Clipboard;
import org.xmeta.util.ThingUtil;

def treeItem = innerOutline.getSelection()[0];
def thing = treeItem.getData();
thing = world.getThing(thing.metadata.path);

def memObj = Clipboard.get();
if(memObj == null) return;

memObj = memObj.detach();
ThingUtil.paste(thing, memObj);
thing.save();
thingEntry.getThing();

refreshMenuSelection.handleEvent(null);
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteAsChild
            sname
            pasteAsChild
            stext
            lang:d=粘贴－当作子节点&en=Paste as Child
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            pasteAsChild
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            pasteAsChild
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteAsChild/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteAsChild/@listeners/@pasteAsChildSelection
                sname
                pasteAsChildSelection
                stype
                Selection
                slabel
                pasteAsChildSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                pasteAsChildSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@pasteAsChild/@listeners/@pasteAsChildSelection/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  pasteAsChildSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.util.ThingUtil;

import xworker.swt.ui.swt.Clipboard;

def treeItem = innerOutline.getSelection()[0];
def thing = treeItem.getData();

def memObj = Clipboard.get();
if(memObj == null) return;

memObj = memObj.detach();
ThingUtil.pasteAsChild(thing, memObj);

thing.save();
thingEntry.getThing();

refreshMenuSelection.handleEvent(null);
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@popSeparator
            sname
            popSeparator
            stext
            ""
            sstyle
            SEPARATOR
            slabel
            popSeparator
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            popSeparator
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@refreshMenuItem
            sname
            refreshMenuItem
            stext
            lang:d=刷新&en=Refresh
            sstyle
            PUSH
            sselected
            false
            senabled
            true
            slabel
            refreshMenuItem
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sid
            refreshMenuItem
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@refreshMenuItem/@listeners
              sname
              listeners
              slabel
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@refreshMenuItem/@listeners/@refreshMenuSelection
                sname
                refreshMenuSelection
                stype
                Selection
                slabel
                refreshMenuSelection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sid
                refreshMenuSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@popMenu/@refreshMenuItem/@listeners/@refreshMenuSelection/@GroovyAction
                  sname
                  GroovyAction
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                  smethodName
                  refreshMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;

import xworker.swt.util.XWorkerTreeUtil;

def treeItem = innerOutline.getSelection()[0];
def thing = treeItem.getData();
thing = world.getThing(thing.metadata.path);
//currentThing = thing;

//initItemColor(treeItem, thing);
actions.doAction("initOutlineTreeItem", actionContext, ["thing":thing, "treeItem":treeItem]);

//treeItem.setText(thing.metadata.label + " (" + thing.thingName + ")");
//treeItem.setData(thing);
//treeItem.setToolTip(thing.metadata.objectName);
treeItem.removeAll();

if(thing != null){
    for(child in thing.childs){
        initChild(treeItem, child, actions);
    }
}

treeItem.setExpanded(true);

if(actionContext.get("disableOpenThingAfterRefresh") == true){
    //checkThing检测到外部更新后，会刷新整个事物，可能会造成递归
}else{
    actions.doAction("openThing", [:]);
}

initExpand(treeItem);

def initExpand(treeItem){
    def path = treeItem.getData().getMetadata().getPath();
    if(innerOutlineExpandCache.get(path) != null){
        treeItem.setExpanded(true);
    }
    
    for(childItem in treeItem.getItems()){
        initExpand(childItem);
    }
}

def initChild(treeItem, dataObj, actions){
    TreeItem item = new TreeItem(treeItem, SWT.NONE);
    //item.setText(dataObj.metadata.label + " (" + dataObj.thingName + ")");
    //item.setData(dataObj);
    actions.doAction("initOutlineTreeItem", actionContext, ["thing": dataObj, "treeItem": item]);
    //initItemColor(item, dataObj);
    //item.setToolTip(dataObj.thingName);
    //actions.doAction("clearCache", ["thing":dataObj]);    
    
    for(child in dataObj.childs){
        initChild(item, child, actions);
    }
}
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  GroovyAction
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource
          sname
          dragSource
          sDROP_NONE
          false
          sDROP_COPY
          false
          sDROP_MOVE
          false
          sDROP_LINK
          false
          sdescriptors
          xworker.swt.widgets.Control/@DragSource
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          dragSource
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@Transfer
            sname
            Transfer
            stype
            Text
            sdescriptors
            xworker.swt.dnd.DragSource/@Transfer
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            Transfer
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@DragSourceEffect
            sname
            DragSourceEffect
            stype
            TreeDragSourceEffect
            sdescriptors
            xworker.swt.dnd.DragSource/@DragSourceEffect
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            DragSourceEffect
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@Listener
            sname
            dragStrat
            stype
            DragStart
            sdescriptors
            xworker.swt.dnd.DragSource/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            Listener
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@Listener/@GroovyAction
              sname
              GroovyAction
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              dragStrat
              sdisableGlobalContext
              false
              Scode
#$@text#$@
//根节点不能移动
def tree = event.widget.getControl();
if(tree.getSelection()[0] == innerOutline.getItems()[0]){
    event.doit = false;
}
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@dragSetData
            sname
            dragSetData
            stype
            DragSetData
            sdescriptors
            xworker.swt.dnd.DragSource/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            dragSetData
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dragSource/@dragSetData/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              dragSetData
              sdisableGlobalContext
              false
              Scode
#$@text#$@
//根节点不能移动
def tree = event.widget.getControl();
event.data = tree.getSelection()[0].getData().getMetadata().getPath();
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              GroovyAction
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget
          sname
          dratTarget
          sDROP_NONE
          false
          sDROP_COPY
          false
          sDROP_MOVE
          false
          sDROP_LINK
          false
          sdescriptors
          xworker.swt.widgets.Control/@DropTarget
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          dratTarget
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@Transfer
            sname
            Transfer
            stype
            Text
            sdescriptors
            xworker.swt.dnd.DropTarget/@Transfer
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            Transfer
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@DropTargetEffect
            sname
            DropTargetEffect
            stype
            TreeDropTargetEffect
            sdescriptors
            xworker.swt.dnd.DropTarget/@DragSourceEffect
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            DropTargetEffect
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@drop
            sname
            drop
            stype
            Drop
            sdescriptors
            xworker.swt.dnd.DropTarget/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            drop
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@drop/@GroovyAction
              sname
              GroovyAction
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              dragTargetDrop
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import org.eclipse.swt.graphics.Point;
import org.xmeta.ActionContext;

def thing = world.getThing(event.data);
if(thing == null){
    event.doit = false;
    return;
}

def point = innerOutline.toControl(event.x, event.y);
def item = innerOutline.getItem(point);
if(item == null){
    event.doit = false;
    return;
}

if(item.getData() == thing){
    event.doit = false;
}

def ac = new ActionContext();
ac.put("parent", innerOutline);
ac.put("parentContext", actionContext);
ac.put("targetItem", item);
ac.put("targetThing", item.getData());
ac.put("thing", thing);
ac.put("thingEntry", thingEntry);
ac.put("innerOutline", innerOutline);

def menuThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu");
def menu = menuThing.doAction("create", ac);

if(item == innerOutline.getItems()[0]){
    ac.preItem.setEnabled(false);
    ac.nextItem.setEnabled(false);
    ac.copyPreItem.setEnabled(false);
    ac.copyNextItem.setEnabled(false);
}
menu.setLocation(event.x, event.y);
menu.setVisible(true);
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              GroovyAction
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@dropAccept
            sname
            dropAccept
            stype
            DropAccept
            sdescriptors
            xworker.swt.dnd.DropTarget/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            dropAccept
              @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@dratTarget/@dropAccept/@GroovyAction
              sname
              GroovyAction
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
              smethodName
              dropAccept
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import org.eclipse.swt.graphics.Point;

def thing = world.getThing(event.data);
if(thing == null){
    event.doit = false;
    return;
}

def point = innerOutline.toControl(event.x, event.y);
def item = innerOutline.getItem(point);
if(item == null){
    event.doit = false;
    return;
}

if(item.getData() == thing){
    event.doit = false;
}
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              GroovyAction
          @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@onMenuDetect
          sname
          onMenuDetect
          sdescriptors
          xworker.swt.widgets.Widget/@Event
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          onMenuDetect
            @/@rightComposite/@contentComposite/@mainSashForm/@innerOutline/@onMenuDetect/@GroovyAction
            sname
            GroovyAction
            sthrowException
            true
            suseOtherAction
            false
            suseOuterJava
            true
            suseInnerJava
            false
            souterClassName
            xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
            smethodName
            onMenuDetect
            sdisableGlobalContext
            false
            scode
            innerOutline.setMenu(popMenu);
            sattributeTemplate
            false
            sinterpretationType
            Action
            svarScope
            Global
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.JavaAction
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            GroovyAction
        @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite
        sname
        editPartComposite
        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
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Composite
        sid
        editPartComposite
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite
          sname
          contentEditComposite
          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
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Composite
          sth_mark
          true
          sid
          contentEditComposite
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@contentEditCompositeGridLayout
            sname
            contentEditCompositeGridLayout
            smakeColumnsEqualWidth
            false
            smarginWidth
            5
            smarginHeight
            5
            smarginLeft
            0
            smarginTop
            0
            smarginRight
            0
            smarginBottom
            0
            shorizontalSpacing
            5
            sverticalSpacing
            5
            slabel
            contentEditCompositeGridLayout
            sdescriptors
            xworker.swt.Layouts/@GridLayout
            sid
            contentEditCompositeGridLayout
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@structComposite
            sname
            structComposite
            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
            slabel
            structComposite
            scapture
            false
            senabled
            true
            sredraw
            true
            svisible
            true
            sdescriptors
            ,xworker.swt.widgets.Composite
            sth_mark
            true
            sid
            structComposite
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@structComposite/@structCompositeFillLayout
              sname
              structCompositeFillLayout
              stype
              SWT.HORIZONTAL
              slabel
              structCompositeFillLayout
              sdescriptors
              xworker.swt.Layouts/@FillLayout
              sid
              structCompositeFillLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@structComposite/@structCompositeGridData
              sname
              structCompositeGridData
              sstyle
              FILL_BOTH
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              slabel
              structCompositeGridData
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sid
              structCompositeGridData
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite
            sname
            contentEditButtonComposite
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Composite
            sth_mark
            true
            sid
            childContentButtonComposite
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@childContentButtonCompositeGridData
              sname
              childContentButtonCompositeGridData
              sstyle
              FILL_HORIZONTAL
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              END
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              slabel
              childContentButtonCompositeGridData
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sid
              childContentButtonCompositeGridData
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@childContentButtonCompositeRowLayout
              sname
              childContentButtonCompositeRowLayout
              sfill
              false
              sjustify
              false
              smarginWidth
              0
              smarginHeight
              0
              smarginLeft
              3
              smarginTop
              3
              smarginRight
              3
              smarginBottom
              3
              spack
              true
              sspacing
              3
              stype
              SWT.HORIZONTAL
              swrap
              true
              slabel
              childContentButtonCompositeRowLayout
              sdescriptors
              xworker.swt.Layouts/@RowLayout
              sid
              childContentButtonCompositeRowLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@addChildButton
              sname
              addChildButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@switchToAddChildButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              slabel
              addChildButton
              sdescriptors
              xworker.swt.Widgets/@Button
              sid
              addChildButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@addChildButton/@Listeners
                sname
                Listeners
                slabel
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@addChildButton/@Listeners/@addChildSelectionListener
                  sname
                  showAddChildSelectionListener
                  stype
                  Selection
                  slabel
                  addChildSelectionListener
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sid
                  addChildSelectionListener
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@addChildButton/@Listeners/@addChildSelectionListener/@addChildSelection
                    sname
                    addChildSelection
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    showAddChildSelectionListener
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
if(actionContext.get("doInitChildTree") == false){
    //如果子节点树没有初始化，那么初始化
    actionContext.getScope(0).put("doInitChildTree", true);
    descriptsComboSelection.handleEvent(null);
}

//每次清空查询
if(childKeyText.getText() != ""){   
    childKeyText.setText(""); 
    descriptsComboSelection.handleEvent(null);   
}

editPartCompositeStackLayout.topControl = addChildSashForm;
editPartComposite.layout();
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    addChildSelection
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@viewMarkButton
              sname
              viewMarkButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@viewMark
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sth_createIndex
              false
              sth_mark
              false
              sid
              viewMarkButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@viewMarkButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sth_createIndex
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@viewMarkButton/@Listeners/@markButtonSelection
                  sname
                  viewmarkButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sth_createIndex
                  false
                  sth_mark
                  false
                  sid
                  markButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@viewMarkButton/@Listeners/@markButtonSelection/@markButtonSelectionAction
                    sname
                    viewmarkButtonSelectionAction
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    viewmarkButtonSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.ActionContext;
import xworker.swt.util.SwtDialog;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;

//创建弹出窗口
def dialogThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.MarkTreeDialog");
def ac = new ActionContext();
ac.put("parent", markButton.getShell());
def dialogShell = dialogThing.doAction("create", ac);

//设置标记的节点
initMarkTreItem(ac.markTree, currentThing.getRoot());

//显示
def dialog = new SwtDialog(markButton.getShell(), dialogShell, ac);
def result = dialog.open();
if(result != null){
    actions.doAction("selectThing", actionContext, ["thing": result, "refresh": false]);    
}

def initMarkTreItem(treeItem, thing){
    def item = null;
    def th_mark = actions.doAction("getCurrentAttribute", actionContext, ["thing": thing, "name": "th_mark"]);
    if(th_mark == "true"){
        item = new TreeItem(treeItem, SWT.NONE);
        actions.doAction("initOutlineTreeItem", actionContext, ["treeItem": item, "thing": thing]);
    }
    
    if(item != null){
        for(child in thing.getChilds()){
            initMarkTreItem(item, child);
        }
        
        item.setExpanded(true);
    }else{
        for(child in thing.getChilds()){
            initMarkTreItem(treeItem, child);
        }
    }
}
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    markButtonSelectionAction
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@markButton
              sname
              markButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@markButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sth_createIndex
              false
              sid
              markButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@markButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sth_createIndex
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@markButton/@Listeners/@markButtonSelection
                  sname
                  markButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sth_createIndex
                  false
                  sth_mark
                  false
                  sid
                  markButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@markButton/@Listeners/@markButtonSelection/@markButtonSelectionAction
                    sname
                    markButtonSelectionAction
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    markButtonSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import org.xmeta.ActionContext;
import xworker.swt.util.SwtDialog;

def dialogThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.MarkDialog");
def ac = new ActionContext();
ac.put("parent", markButton.getShell());
ac.put("thing", currentThing);
ac.put("treeItem", innerOutline.getSelection()[0]);
ac.put("explorerActions", explorerActions);

def dialogShell = dialogThing.doAction("create", ac);
ac.message.setText("按返回按钮可以返回到：\n" + currentThing.getMetadata().getLabel());
dialogShell.open();
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    markButtonSelectionAction
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton
              sname
              commandButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@command
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              commandButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton/@Listeners/@commandButtonSelection
                  sname
                  commandButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  commandButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton/@Listeners/@commandButtonSelection/@GroovyAction
                    sname
                    GroovyAction
                    sisSynchronized
                    false
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    commandButtonSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import xworker.swt.ide.assistor.Assistor;

def editorCommandDomain = world.getThing("xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain");
Assistor.runCommandDomain(editorCommandDomain, actionContext);
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sswitchResult
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton1
              sname
              editByXmlButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@xmlEditorButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              commandButton1
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton1/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton1/@Listeners/@commandButtonSelection
                  sname
                  editByXmlButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  commandButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@commandButton1/@Listeners/@commandButtonSelection/@GroovyAction
                    sname
                    GroovyAction
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    editByXmlButtonSelection
                    sdisableGlobalContext
                    false
                    scode
                    editModelItemSelection.handleEvent(null);
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton
              sname
              guideButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@guide
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              guideButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton/@Listeners/@guideButtonSelection
                  sname
                  guideButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  guideButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton/@Listeners/@guideButtonSelection/@GroovyAction
                    sname
                    GroovyAction
                    sthrowException
                    true
                    suseOtherAction
                    false
                    suseOuterJava
                    true
                    suseInnerJava
                    false
                    souterClassName
                    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                    smethodName
                    guideButtonSelection
                    sdisableGlobalContext
                    false
                    Scode
#$@text#$@
import xworker.swt.ide.utils.ThingGuide;

//先保存
actions.doAction("save");

//第一个默认向导界面是选择向导
new ThingGuide(currentThing, world.getThing("xworker.core.util.ThingGuideSelector"), actionContext);

editPartCompositeStackLayout.topControl = guideComposite;
editPartComposite.layout();

/*
//设置当前事物的描述者
if(!currentThing.isThing("xworker.core.ThingGuide")){
    def descriptors = currentThing.getStringBlankAsNull("descriptors");
    if(descriptors != null && descriptors != ""){
        descriptors = "xworker.core.ThingGuide,"  + descriptors;
    }else{
        descriptors = "xworker.core.ThingGuide";
    }
    currentThing.put("descriptors", descriptors);
}
//currentThing.put("descriptors", "xworker.core.ThingGuide");
//设置向导
currentThing.put("tg_thingGuidePath", "xworker.core.util.ThingGuideSelector");

//刷新编辑器
//actions.doAction("setThing", actionContext, "thing", currentThing);
actions.doAction("openThing", actionContext, "thing", currentThing);
*/
#$@text#$@
                    sattributeTemplate
                    false
                    sinterpretationType
                    Action
                    svarScope
                    Global
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.JavaAction
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    GroovyAction
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton1
              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.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              guideButton1
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton1/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@contentEditComposite/@childContentButtonComposite/@guideButton1/@Listeners/@guideButtonSelection
                  sname
                  guideButtonSelection
                  stype
                  Selection
                  sref
                  actions:save
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  guideButtonSelection
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm
          sname
          addChildSashForm
          sstyle
          VERTICAL
          sSMOOTH
          false
          sweights
          50,50
          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
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@SashForm
          sid
          addChildSashForm
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash
            sname
            childTreeDescSash
            sstyle
            HORIZONTAL
            sSMOOTH
            false
            sweights
            50,50
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@SashForm
            sid
            childTreeDescSash
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite
              sname
              childsComposite
              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
              slabel
              childsComposite
              sdescriptors
              xworker.swt.Widgets/@Composite
              sid
              propertiesComposite
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childsCompositeGridLayout
                sname
                childsCompositeGridLayout
                snumColumns
                3
                smakeColumnsEqualWidth
                false
                smarginWidth
                5
                smarginHeight
                0
                smarginLeft
                0
                smarginTop
                0
                smarginRight
                0
                smarginBottom
                0
                shorizontalSpacing
                5
                sverticalSpacing
                5
                slabel
                childsCompositeGridLayout
                sdescriptors
                xworker.swt.Layouts/@GridLayout
                sid
                childsCompositeGridLayout
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@structCombo
                sname
                structCombo
                stype
                DROP_DOWN
                sREAD_ONLY
                false
                slabel
                structCombo
                sdescriptors
                xworker.swt.Widgets/@Combo
                sid
                structCombo
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@structCombo/@listeners
                  sname
                  listeners
                  slabel
                  listeners
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners
                  sid
                  listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@structCombo/@listeners/@descriptsComboSelection
                    sname
                    descriptsComboSelection
                    stype
                    Selection
                    slabel
                    descriptsComboSelection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sid
                    descriptsComboSelection
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@structCombo/@listeners/@descriptsComboSelection/@GroovyAction
                      sname
                      GroovyAction
                      sthrowException
                      false
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                      smethodName
                      descriptsComboSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
int index = structCombo.getSelectionIndex();
if(index == -1){
    return;
}

def descriptors = structCombo.getData();
def descriptor = descriptors.get(index);

childScripts.doAction("selectDescriptor", ["descriptor":descriptor, "thing":structCombo.getData("thing")]);
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      GroovyAction
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText
                sname
                childKeyText
                sstyle
                SINGLE
                sH_SCROLL
                false
                sV_SCROLL
                false
                sWRAP
                false
                sREAD_ONLY
                false
                sPASSWORD
                false
                sSEARCH
                false
                sCANCEL
                false
                sBORDER
                true
                salign
                LEFT
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Text
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_mark
                false
                sid
                childKeyText
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText/@childKeyTextGridData
                  sname
                  childKeyTextGridData
                  sstyle
                  FILL_HORIZONTAL
                  shorizontalIndent
                  0
                  swidth
                  -1
                  sheight
                  -1
                  shorizontalAlignment
                  BEGINNING
                  sverticalAlignment
                  CENTER
                  shorizontalSpan
                  1
                  sverticalSpan
                  1
                  sgrabExcessHorizontalSpace
                  false
                  sgrabExcessVerticalSpace
                  false
                  sdescriptors
                  xworker.swt.layout.LayoutDatas/@GridData
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_mark
                  false
                  sid
                  childKeyTextGridData
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText/@Listeners
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_mark
                  false
                  sid
                  Listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText/@Listeners/@Listener
                    sname
                    Listener
                    stype
                    DefaultSelection
                    sref
                    descriptsComboSelection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_mark
                    false
                    sid
                    Listener
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText/@Listeners/@childKeyTextKeydown
                    sname
                    childKeyTextKeydown
                    stype
                    KeyDown
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    childKeyTextKeydown
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childKeyText/@Listeners/@childKeyTextKeydown/@KeyTravel
                      sname
                      KeyTravel
                      swidget
                      childTree
                      sselectionListener
                      xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@listeners/@childTreeSelection/@GroovyAction
                      sinterpretationType
                      Self
                      sattributeTemplate
                      false
                      schildsAttributeTemplate
                      false
                      svarScope
                      Local
                      sisSynchronized
                      false
                      sthrowException
                      true
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdisableGlobalContext
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.swt.actions.EventActions/@KeyTravel
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      KeyTravel
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childSeachButton
                sname
                childSeachButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                simage
                findImage
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_mark
                false
                sid
                childSeachButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childSeachButton/@Listeners
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_mark
                  false
                  sid
                  Listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childSeachButton/@Listeners/@Listener
                    sname
                    Listener
                    stype
                    Selection
                    sref
                    descriptsComboSelection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_mark
                    false
                    sid
                    Listener
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree
                sname
                childTree
                sselectStyle
                SINGLE
                sV_SCROLL
                true
                sH_SCROLL
                true
                sCHECK
                false
                sFULL_SELECTION
                true
                sHIDE_SELECTION
                false
                sBORDER
                false
                slineVisible
                false
                smultipleColumns
                false
                sheaderVisible
                false
                ssortIndicator
                false
                smoveableColumns
                false
                sheadImages
                false
                ssubImages
                false
                slabel
                childTree
                sdescriptors
                ,xworker.swt.widgets.Tree
                sid
                childTree
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@childTreeGridData
                  sname
                  childTreeGridData
                  sstyle
                  FILL_BOTH
                  shorizontalIndent
                  0
                  swidth
                  -1
                  sheight
                  -1
                  shorizontalAlignment
                  BEGINNING
                  sverticalAlignment
                  CENTER
                  shorizontalSpan
                  3
                  sverticalSpan
                  1
                  sgrabExcessHorizontalSpace
                  false
                  sgrabExcessVerticalSpace
                  false
                  slabel
                  childTreeGridData
                  sdescriptors
                  xworker.swt.Commons/@GridData
                  sid
                  childTreeGridData
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@listeners
                  sname
                  listeners
                  slabel
                  listeners
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners
                  sid
                  listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@listeners/@childTreeSelection
                    sname
                    childTreeSelection
                    stype
                    Selection
                    slabel
                    childTreeSelection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sid
                    childTreeSelection
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@listeners/@childTreeSelection/@GroovyAction
                      sname
                      GroovyAction
                      sthrowException
                      false
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                      smethodName
                      childTreeSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.events.SwtListener;
import xworker.swt.listeners.SwtMenuListener;
import org.xmeta.util.UtilString;
import xworker.lang.util.XWorkerUtils;

import org.eclipse.swt.SWT;

import xworker.swt.form.ThingDescriptorForm;
import xworker.swt.util.SwtUtils;

def treeItem = childTree.getSelection()[0];
def objStruct = treeItem.getData();
if(objStruct == null) return;


//先清空原有的添加面板
for(child in childContentComposite.getChildren()){
    child.dispose();
}

newThingDescriptor = objStruct;

SwtUtils.setThingDesc(objStruct, childDescBrowser);

/*
if(actions.doAction("hasXWorker", actionContext)){
    def webUrl = XWorkerUtils.getThingDescUrl(objStruct);
    childDescBrowser.setUrl(webUrl);
}else{
    def desc = objStruct.getMetadata().getDescription();
    if(desc == null){
        desc = "";
    }
    childDescBrowser.setText(desc);
}

childTitleLabel.setText(UtilString.getString("res:res.w_exp:addLabel添加：", actionContext) + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
String toolTipText = "<b><u><a href=\"" + webUrl + "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + objStruct.getMetadata().getPath() + "\">" + objStruct.getMetadata().getName() + "</a></u></b><br/><br/>";
if(objStruct.metadata.description != null){
    String ttText = objStruct.metadata.description;
    childTitleLabel.setData("toolTip", toolTipText + ttText);
}else{
    childTitleLabel.setData("toolTip", toolTipText);
}

for(child in addChildComposite.getChildren()){
    child.dispose();
    addChildComposite.removeControl(child);
}
*/
//初始化编辑内容窗体
Thing structForm = new Thing();
structForm.set("descriptors", "xworker.swt.xworker.ThingDescritporForm");
structForm.name = "contentForm";
structForm.descriptorPath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

def thing = new Thing("", "", objStruct.metadata.path, false);
ActionContext context = new ActionContext();
//context.put("parent", addChildComposite);
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildSelectionListener);
context.put("explorerActions", actionContext.get("explorerActions"));
context.put("explorerContext", actionContext.get("explorerContext"));
context.put("utilBrowser", actionContext.get("utilBrowser"));

def structFormObj = ThingDescriptorForm.createThingSingleColumnForm(thing, objStruct, "addChildOkButtonSelection", null, childContentComposite, context);
//def structFormObj = structForm.doAction("create", context);
context = structFormObj.getData();
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildSelectionListener);
context.model.defaultSelection = "addChildOkButtonSelection";
//context.model.doAction("init", context);
context.model.doAction("setValue", context);

currentAddModel = context.model;
currentAddModelContext =  context;
addChildButton.setData("currentAddModelContext", context);
addChildButton.setData("currentAddModel", currentAddModel);
addChildButton.setEnabled(true);

/*
addChildComposite.layout();

if(contentEditCompositeStackLayout.topControl != childComposite){
    contentEditComposite.setData("oldTopControl", contentEditCompositeStackLayout.topControl);
    contentEditCompositeStackLayout.topControl = childComposite;
    contentEditComposite.layout();
}
*/

if(actionContext.get("helpBrowserAction") != null){
    helpBrowserAction.doAction("setThing", ["thing":newThingDescriptor]);
}
//log.info("helpBrowserAction=" + helpBrowserAction);

childTreeInteractiveUI.fire(objStruct);
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      GroovyAction
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@interactiveUI
                  sname
                  childTreeInteractiveUI
                  slabel
                  添加子节点树
                  sen_label
                  Add Child Tree
                  sen_group
                  Thing Editor
                  sdescriptors
                  xworker.swt.Widgets/@InteractiveUI
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sgroup
                  模型编辑器
                  sth_fileMonitor
                  false
                  sth_deprecated
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  snotXmlAttribute
                  false
                  sjson_isArray
                  false
                  sid
                  interactiveUI
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@interactiveUI/@actions
                    sname
                    actions
                    sdescriptors
                    xworker.swt.xwidgets.InteractiveUI/@actions1
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    actions
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@childTree/@interactiveUI/@actions/@getCommandIndex
                      sname
                      getCommandIndex
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                      smethodName
                      getCommandIndex
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.xmeta.Thing;

if(childTree.getSelection().length == 0){
    return;
}

def treeItem = childTree.getSelection()[0];
def objStruct = treeItem.getData();
if(objStruct == null) return;

def currentThing = objStruct;
def path = currentThing.getMetadata().getPath();
def key = "__commandAssistorThing__";
if(_g.get(key) == path){
    //println(path);
    //println(_g.get(key));
    //println("thing editor interativeUI is current thng");
    return null;    
}

//使用新的临时的事物伪装当前正在编辑的事物
//def thing = world.getThing("xworker.ide.worldexplorer.swt.dataExplorerParts.ThingCommandIndexRoot");
//thing = thing.detach();
def thing = new Thing();
def thingPath = thing.getMetadata().getPath();
thing.set("descriptors", currentThing.getMetadata().getPath());
//默认不查询描述者，所以放到继承里
def descs = currentThing.getMetadata().getPath();
def exts = path + ",xworker.ide.worldexplorer.swt.dataExplorerParts.ThingCommandIndexRoot";
if(descs != null){
    exts = exts + "," + descs;
}
thing.set("extends", exts);
thing.set("label", currentThing.getMetadata().getLabel() + ":");
thing.set("thingPath", thingPath);
def description = thing.getDescriptor().getMetadata().getDescription();
//println(description);
thing.set("description", description);
//thing.getMetadata().setPath(path);

_g.put(key, path);
//println("interactive ok");
//println(thingPath);
return thingPath;
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      getCommandIndex
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts
                sname
                childScripts
                slabel
                childScripts
                sdescriptors
                xworker.swt.Widgets/@actions
                sid
                scripts
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@initChilds
                  sname
                  initChilds
                  slabel
                  initChilds
                  sisSynchronized
                  false
                  sthrowException
                  false
                  suseOtherAction
                  false
                  svarScope
                  Global
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
def dataObject = _request.get("dataObject");

def descriptors = dataObject.getMetadata().getDescriptors();

structCombo.removeAll();
structCombo.setData("descriptors", descriptors);
for(des in descriptors){
    structCombo.add(des.metadata.label);
}

log.info("ini childs");
structCombo.setData("dataObject", dataObject);
structCombo.select(0);

childScripts.exec("selectDescriptor", ["descriptor":descriptors[0], "dataObject":dataObject]);
#$@text#$@
                  sdescriptors
                  xworker.lang.actions.Actions/@GroovyAction
                  sid
                  initChilds
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@selectDescriptor
                  sname
                  selectDescriptor
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                  smethodName
                  selectDescriptor
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

import java.util.Collections;
import java.util.Comparator;

import xworker.swt.util.ResourceManager;
import xworker.swt.util.XWorkerTreeUtil;
import xworker.lang.util.ThingUtils;

if(actionContext.get("doInitChildTree") == false){
    return;
}

def start = System.currentTimeMillis();
def desChilds = descriptor.getAllChilds("thing");
//for(child in desChilds){
//    log.info("child=" + child);
//}
//查找并添加注册的子事物
try{
    def registThing = world.getThing("xworker.ide.db.dbindex.app.dataObject.RegistsByThing");
    if(registThing != null){
        def rchilds = registThing.doAction("query", actionContext, ["thing":descriptor, "noDescriptor":true, "registType":"child"]);
        def context = [:];
        for(rc in rchilds){
            //log.info("child=" + rc);
            def child = world.getThing(rc.get("path"));        
    
            if(child != null){
                if(child.getBoolean("th_registMyChilds")){
                    for(cchild in child.getChilds()){
                        addThing(desChilds, cchild, context);
                    }
                }else{
                    addThing(desChilds, child, context);
                }
            }
        }
    
        ThingUtils.initFromRegistCache(desChilds, context, descriptor, "child");
    }
}catch(Exception e){
    log.info("add regist child error", e);
}
//log.info("Select DB Time: " + (System.currentTimeMillis() - start));

def keyword = childKeyText.getText().toLowerCase();
dess = [];
def expand = keyword != "";
for(des in desChilds){
    if(des.getString("many") == "false"){
        //只找首要描述者相同的子节点，其他情况不再过滤了
        boolean have = false;
        for(child in currentThing.getChilds()){
            if(child.getDescriptor().metadata.path == des.metadata.path){
                have = true;
                break;
            }
        }
        if(have){
            continue;
        }
    }
    
    //过滤关键字
    def keys = keyword.split("[ ]");
    def addok = true;
    for(key in keys){
        def desKeys = des.getString("th_keywords");
        def ok = false;
        if(desKeys != null && desKeys.toLowerCase().indexOf(key) != -1){
            ok = true;
        }
        if(!ok && des.getMetadata().getPath().toLowerCase().indexOf(key) != -1){
            ok = true;
        }
        if(!ok){
            def group = des.getString("group");
            if(group != null && group.toLowerCase().indexOf(key) != -1){
                ok = true;
            }
        }
        if(!ok && des.getMetadata().getLabel().toLowerCase().indexOf(key) != -1){
            ok = true;
        }
        if(!ok){
            addok = false;
            break;
        }
    }

    if(addok){
        dess.add(des);
    }
}
//log.info("Filter Many Time: " + (System.currentTimeMillis() - start));

//分组
def root = ["childs":[]];
for(des in dess){
    def group = des.getString("group");
    if(group == null || group == ""){
        root.childs.add(des);
    }else{
        for(grs in group.split("[,]")){
            def gs = grs.split("[.]");
            def subRoot = null;
            def currentRoot = root;
            for(g in gs){
                subRoot = currentRoot.get(g);
                if(subRoot == null){ 
                    subRoot = ["childs":[]];
                    subRoot.put("__name__", g);
                    currentRoot.put(g, subRoot);
                }
                currentRoot = subRoot;
            }
            subRoot.childs.add(des);
        }
    }
}

//log.info("Group Time: " + (System.currentTimeMillis() - start));
//构造子节点树
childTree.removeAll();
createTree(childTree, root, expand);
createTemplate(childTree);
//log.info("Create Tree Time: " + (System.currentTimeMillis() - start));

def createTemplate(item){
    def tItem = new TreeItem(item, SWT.NONE);
    tItem.setText("#ThingTemplate");    
    def img = ResourceManager.createIamge("icons/folder.png", actionContext);
	if(img != null){
	    tItem.setImage(img);
	}
        
    //添加事物模板的子节点
    def template = world.getThing("xworker.core.util.ThingTemplate");
    for(child in template.getChilds("thing")){
        def subItem = new TreeItem(tItem, SWT.NONE);
        XWorkerTreeUtil.initItem(subItem, child, actionContext);
        subItem.setText(child.metadata.label);
        subItem.setData(child);
    }
}

def createTree(item, aroot, expand){
    def groups = [];
    for(key in aroot.keySet()){
        def v = aroot.get(key);
        if(v instanceof Map){
            groups.add(v);
        }
    }
    
    //为group排序
    Collections.sort(groups, [
            compare : {
               o1, o2->
               if(o1.__name__.toLowerCase() < o2.__name__.toLowerCase()) return -1;
               if(o1.__name__.toLowerCase() == o2.__name__.toLowerCase()) return 0;
               return 1;
            }
        ] as Comparator);
    for(g in groups){
        Collections.sort(g.childs, [
                compare : {
                   o1, o2->
                   if(o1.metadata.label.toLowerCase() < o2.metadata.label.toLowerCase()) return -1;
                   if(o1.metadata.label.toLowerCase() == o2.metadata.label.toLowerCase()) return 0;
                   return 1;
                }
            ] as Comparator);
        def subItem = new TreeItem(item, SWT.NONE);
        subItem.setText(g.__name__);
        def img = ResourceManager.createIamge("icons/folder.png", actionContext);
		if(img != null){
		    subItem.setImage(img);
		}
        
        createTree(subItem, g, expand);
    }

    Collections.sort(aroot.childs, [
                compare : {
                   o1, o2->
                   if(o1.metadata.label.toLowerCase() < o2.metadata.label.toLowerCase()) return -1;
                   if(o1.metadata.label.toLowerCase() == o2.metadata.label.toLowerCase()) return 0;
                   return 1;
                }
            ] as Comparator);
    for(child in aroot.childs){       
        def subItem = new TreeItem(item, SWT.NONE);
        def icon = child.icon;
        if(icon == null || icon == ""){
            XWorkerTreeUtil.initItem(subItem, child, actionContext);
        }else{
            XWorkerTreeUtil.initItem(subItem, child.th_font, child.th_nodeColor, child.icon, actionContext);
        }
        subItem.setText(child.metadata.label);
        subItem.setData(child);
    }
    
    if(expand && item instanceof TreeItem){
        item.setExpanded(true);
    }
}

def addThing(list, thing, context){
    def path = thing.getMetadata().getPath();
    if(context.get(path) != null){
        return;
    }
    
    context.put(path, path);
    list.add(thing);
}
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  selectDescriptor
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@selectChildList
                  sname
                  selectChildList
                  sthrowException
                  false
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                  smethodName
                  selectChildList
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import groovy.lang.Binding;

import org.xmeta.DataObject;
import org.xmeta.util.UtilDefault;
import org.xmeta.plugin.view.swt.SwtListener;
import org.xmeta.listener.SwtMenuListener;

import org.eclipse.swt.SWT;

def selectIndex = childList.getSelectionIndex();
if(selectIndex == -1) return;
def objStruct = childList.getData().get(selectIndex);

childTitleLabel.setText("添加：" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
String toolTipText = "<b><u>" + objStruct.getMetadata().getName() + "</u></b><br/><br/>";    			    
if(objStruct.getString("description") != null){
    String ttText = objStruct.getString("description");
    childTitleLabel.setData("toolTip", toolTipText + ttText);
}else{
    childTitleLabel.setData("toolTip", toolTipText);
}

//初始化编辑内容窗体
DataObject structForm = new DataObject();
structForm.setAttribute("descriptors", "view.objects.swt.xworker.StructureForm");
structForm.name = "contentForm";
structForm.structurePath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

for(child in addChildComposite.getChildren()){
    child.dispose();
    addChildComposite.removeControl(child);
}

def dataObject = new DataObject();
Binding cbin = new Binding();
cbin.setVariable("binding", cbin);
cbin.setVariable("parent", addChildComposite);
cbin.setVariable("dataObject", dataObject);
cbin.setVariable("addChildOkButtonSelection", addChildOkButtonSelection);
def structFormObj = structForm.exec("create", cbin);

cbin.contentFormModel.defaultSelection = "addChildOkButtonSelection";
cbin.contentFormModel.exec("init", cbin);
cbin.contentFormModel.exec("setValue", cbin);
binding.setVariable("currentAddModel", cbin.contentFormModel);
binding.setVariable("currentAddModelBin", cbin);
addChildComposite.layout();

contentEditCompositeStackLayout.topControl = childComposite;
contentEditComposite.layout();
#$@text#$@
                  sattributeTemplate
                  false
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  selectChildList
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@searchChilds
                  sname
                  searchChilds
                  sthrowException
                  true
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                  smethodName
                  searchChilds
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

import java.util.Collections;
import java.util.Comparator;

import xworker.swt.util.ResourceManager;
import xworker.swt.util.XWorkerTreeUtil;
import xworker.lang.util.ThingUtils;

if(actionContext.get("doInitChildTree") == false){
    return;
}

def start = System.currentTimeMillis();
int index = structCombo.getSelectionIndex();
def descriptors = structCombo.getData();
def descriptor = descriptors.get(index);
def desChilds = descriptor.getAllChilds("thing");
//查找并添加注册的子事物
try{
    def registThing = world.getThing("xworker.ide.db.dbindex.app.dataObject.RegistsByThing");
    def rchilds = registThing.doAction("query", actionContext, ["thing":descriptor, "noDescriptor":true, "registType":"child"]);
    def context = [:];
    for(rc in rchilds){
        //log.info("child=" + rchilds);
        def child = world.getThing(rc.get("path"));        
        if(child != null){
            if(child.getBoolean("th_registMyChilds")){
                for(cchild in child.getChilds()){
                    addThing(desChilds, cchild, context);
                }
            }else{
                addThing(desChilds, child, context);
            }
        }
    }
    
    ThingUtils.initFromRegistCache(desChilds, context, descriptor, "child");
}catch(Exception e){
    log.info("add regist child error", e);
}
//log.info("Select DB Time: " + (System.currentTimeMillis() - start));

def keyword = keyword.toLowerCase();
dess = [];
for(des in desChilds){
    if(des.getString("many") == "false"){
        //只找首要描述者相同的子节点，其他情况不再过滤了
        boolean have = false;
        for(child in currentThing.getChilds()){
            if(child.getDescriptor().metadata.path == des.metadata.path){
                have = true;
                break;
            }
        }
        if(have){
            continue;
        }
    }
    
    //过滤关键字
    if(keyword != ""){
        def desKeys = des.getString("th_keywords");
        def ok = false;
        if(desKeys != null && desKeys.toLowerCase().indexOf(keyword) != -1){
            ok = true;
        }
        if(!ok && des.getMetadata().getPath().toLowerCase().indexOf(keyword) != -1){
            ok = true;
        }
        if(!ok){
            def group = des.getString("group");
            if(group != null && group.toLowerCase().indexOf(keyword) != -1){
                ok = true;
            }
        }
        if(!ok && des.getMetadata().getLabel().toLowerCase().indexOf(keyword) != -1){
            ok = true;
        }
        if(!ok){
            continue;
        }
    }

    dess.add(des);
}
//log.info("Filter Many Time: " + (System.currentTimeMillis() - start));

return dess;

def addThing(list, thing, context){
    def path = thing.getMetadata().getPath();
    if(context.get(path) != null){
        return;
    }
    
    context.put(path, path);
    list.add(thing);
}
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Global
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  searchChilds
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@searchChilds/@ins
                    sisValidate
                    false
                    sname
                    ins
                    sdescriptors
                    xworker.lang.actions.Inout/@ins
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    ins
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@propertiesComposite/@scripts/@searchChilds/@ins/@keyword
                      sname
                      keyword
                      stypeCheck
                      false
                      soptional
                      true
                      scheck
                      false
                      scheckLevel
                      exception
                      sdescriptors
                      xworker.lang.actions.Inout/@ins/@param
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      keyword
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@childDescBrowser
              sname
              childDescBrowser
              slabel
              childDescBrowser
              sdescriptors
              xworker.swt.Widgets/@Browser
              sid
              childDescBrowser
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childTreeDescSash/@childDescBrowser/@childDescBrowser
                sname
                childDescBrowserUtil
                sdescriptors
                xworker.swt.browser.Browser/@UtilBrowser
                sid
                childDescBrowser
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite
            sname
            childComposite
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Composite
            sid
            childComposite
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childCompositeGridLayout
              sname
              childCompositeGridLayout
              smakeColumnsEqualWidth
              false
              smarginWidth
              5
              smarginHeight
              5
              smarginLeft
              0
              smarginTop
              0
              smarginRight
              0
              smarginBottom
              0
              shorizontalSpacing
              5
              sverticalSpacing
              5
              slabel
              childCompositeGridLayout
              sdescriptors
              xworker.swt.Layouts/@GridLayout
              sid
              childCompositeGridLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentComposite
              sname
              childContentComposite
              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
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Composite
              sid
              childContentComposite
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentComposite/@childContentCompositeGridData
                sname
                childContentCompositeGridData
                sstyle
                FILL_BOTH
                shorizontalIndent
                0
                swidth
                -1
                sheight
                -1
                shorizontalAlignment
                BEGINNING
                sverticalAlignment
                CENTER
                shorizontalSpan
                1
                sverticalSpan
                1
                sgrabExcessHorizontalSpace
                false
                sgrabExcessVerticalSpace
                false
                slabel
                childContentCompositeGridData
                sdescriptors
                xworker.swt.layout.LayoutDatas/@GridData
                sid
                childContentCompositeGridData
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentComposite/@childContentCompositeFillLayout
                sname
                childContentCompositeFillLayout
                stype
                SWT.HORIZONTAL
                slabel
                childContentCompositeFillLayout
                sdescriptors
                xworker.swt.Layouts/@FillLayout
                sid
                childContentCompositeFillLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite
              sname
              childContentButtonComposite
              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
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Composite
              sid
              childContentButtonComposite
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@childContentButtonCompositeGridData
                sname
                childContentButtonCompositeGridData
                sstyle
                FILL_HORIZONTAL
                shorizontalIndent
                0
                swidth
                -1
                sheight
                -1
                shorizontalAlignment
                END
                sverticalAlignment
                CENTER
                shorizontalSpan
                1
                sverticalSpan
                1
                sgrabExcessHorizontalSpace
                false
                sgrabExcessVerticalSpace
                false
                slabel
                childContentButtonCompositeGridData
                sdescriptors
                xworker.swt.layout.LayoutDatas/@GridData
                sid
                childContentButtonCompositeGridData
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@childContentButtonCompositeRowLayout
                sname
                childContentButtonCompositeRowLayout
                sfill
                false
                sjustify
                false
                smarginWidth
                0
                smarginHeight
                0
                smarginLeft
                3
                smarginTop
                3
                smarginRight
                3
                smarginBottom
                3
                spack
                true
                sspacing
                3
                stype
                SWT.HORIZONTAL
                swrap
                true
                slabel
                childContentButtonCompositeRowLayout
                sdescriptors
                xworker.swt.Layouts/@RowLayout
                sid
                childContentButtonCompositeRowLayout
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@addChildButton
                sname
                addChildButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@addChildButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                false
                sredraw
                true
                svisible
                true
                slabel
                addChildButton
                sdescriptors
                xworker.swt.Widgets/@Button
                sid
                addChildButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@addChildButton/@Listeners
                  sname
                  Listeners
                  slabel
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sid
                  Listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@addChildButton/@Listeners/@addChildSelectionListener
                    sname
                    addChildSelectionListener
                    stype
                    Selection
                    slabel
                    addChildSelectionListener
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sid
                    addChildSelectionListener
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@addChildButton/@Listeners/@addChildSelectionListener/@addChildSelection
                      sname
                      addChildSelection
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                      smethodName
                      addChildSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;

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

//def selectIndex = childList.getSelectionIndex();
def childStructure = actionContext.get("newThingDescriptor");
if(childStructure == null){
    childStructure = childTree.getSelection()[0].getData();
}
def childData = currentAddModel.doAction("getValue", currentAddModelContext);

//创建和添加子节点
Thing childObj = new Thing(null, null, childStructure.metadata.path, false);
childObj.cognize(childData);
childObj.set("descriptors", childStructure.metadata.path);
        
//name属性默认为空
if(childObj.getStringBlankAsNull("name") == null){
    def desc = world.getThing(childStructure.metadata.path);
    if(desc != null){
        childObj.put("name", desc.get("name"));
    }
}

def treeItem = innerOutline.getSelection()[0];

currentThing.addChild(childObj);
currentThing.save();
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 autoAddChilds = childStructure.doAction("ideGetAutoAddChilds", actionContext);
if(autoAddChilds != null){
    def added = false;
    for(childDesc in autoAddChilds){
        added = true;
        def childThing = new Thing(null, null, childDesc, false);
        childThing.initDefaultValue();
        childObj.addChild(childThing);
        TreeItem childItem = new TreeItem(newItem, SWT.NONE);
        actions.doAction("initOutlineTreeItem", actionContext, ["treeItem": childItem, "thing": childThing]);
    }
    
    if(added){
        currentThing.save();
        
        actionContext.getScope(0).put("rootLastModified", currentThing.getRoot().getMetadata().getLastModified());
    }
}

//刷新缓存
thingEntry.getThing();

treeItem.setExpanded(true);
newItem.setExpanded(true);

for(item in innerOutline.items){
    initItemThing(item);
}

//重新设置树节点的缓存事物
def initItemThing(item){
    def thing = item.getData();
    if(thing == null){
        item.dispose();        
    }else{
        item.setData(world.getThing(thing.metadata.path));
        for(childItem in item.items){
            initItemThing(childItem);
        }
    }
}
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      addChildSelection
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@cancelAddChildButton
                sname
                cancelAddChildButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@returnToEditorButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                slabel
                cancelAddChildButton
                sdescriptors
                xworker.swt.Widgets/@Button
                sid
                cancelAddChildButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@cancelAddChildButton/@Listeners
                  sname
                  Listeners
                  slabel
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sid
                  Listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@cancelAddChildButton/@Listeners/@cancelAddChildListener
                    sname
                    cancelAddChildListener
                    stype
                    Selection
                    slabel
                    cancelAddChildListener
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sid
                    cancelAddChildListener
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@cancelAddChildButton/@Listeners/@cancelAddChildListener/@cancelAddChildSelection
                      sname
                      cancelAddChildSelection
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorChildActions
                      smethodName
                      cancelAddChildSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
editPartCompositeStackLayout.topControl = contentEditComposite;
editPartComposite.layout();
#$@text#$@
                      sattributeTemplate
                      false
                      sinterpretationType
                      Action
                      svarScope
                      Global
                      screateLocalVarScope
                      false
                      ssaveReturn
                      false
                      sdebugLog
                      false
                      sdescriptors
                      xworker.lang.actions.JavaAction
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      cancelAddChildSelection
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite
          sname
          xmlComposite
          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
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Composite
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          xmlComposite
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlCompositeGridLayout
            sname
            xmlCompositeGridLayout
            smakeColumnsEqualWidth
            false
            smarginWidth
            5
            smarginHeight
            5
            smarginLeft
            0
            smarginTop
            0
            smarginRight
            0
            smarginBottom
            0
            shorizontalSpacing
            5
            sverticalSpacing
            5
            sdescriptors
            xworker.swt.Layouts/@GridLayout
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            xmlCompositeGridLayout
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText
            sname
            xmlText
            sstyle
            MULTI
            sFULL_SELECTION
            false
            sREAD_ONLY
            false
            sWRAP
            false
            sH_SCROLL
            true
            sV_SCROLL
            true
            sBORDER
            true
            salign
            LEFT
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@StyledText
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            xmlText
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@xmlTextGridData
              sname
              xmlTextGridData
              sstyle
              FILL_BOTH
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.Commons/@GridData
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              xmlTextGridData
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@font
              sname
              font
              sdescriptors
              xworker.swt.Commons/@font
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              font
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@font/@editorFont
                sname
                editorFont
                stype
                Font
                sfontData
                "Courier New|10|0|#000000"
                sdescriptors
                xworker.swt.Commons/@font/@Font
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                editorFont
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners
              sname
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              listeners
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@xmlTextDefaultSelectionListener
                sname
                xmlTextModifyListener
                stype
                Modify
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlTextDefaultSelectionListener
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@xmlTextDefaultSelectionListener/@xmlTextDefaultSeletion
                  sname
                  xmlTextDefaultSeletion
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

/*
def index = xmlText.getCaretOffset();
def xmlDoc = xmlText.getData();
if(index != -1){
    int line = xmlText.getLineAtOffset(index);
    if(line != -1){
        def thing = xmlDoc.getThingAtLine(line);
        
        if(thing != null){
            actions.doAction("selectThing", actionContext, ["thing": thing]);
        }
    }
}*/
if(xmlText.getData("setModified") != false){
    actions.doAction("modify", actionContext, ["modify": true]);
}else{
    xmlText.setData("setModified", null);
}

xmlText.setData("modified", true);
#$@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
                  xmlTextDefaultSeletion
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@mouseDownEvent
                sname
                xmlTextMouseDownEvent
                stype
                MouseDown
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                mouseDownEvent
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@mouseDownEvent/@xmlCompositeMouseDown
                  sname
                  xmlCompositeMouseDown
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import xworker.swt.ide.xmleditor.ThingXmlEditorActions;

//获取xml文档
def doc = ThingXmlEditorActions.getThingXmlDocument(xmlText, actionContext);
def xmlCurrentThing = actionContext.get("xmlCurrentThing");

//显示光标位置
xmlTextSelection.handleEvent(null);

//鼠标左键
if(event.button == 1){
    //println("leftbutton");
    doc.parse(xmlText.getText(), xmlRootThing.getMetadata().getPath());
    def loc = ThingXmlEditorActions.getXmlThingLocation(xmlText, doc);
    if(loc != null){
        def thing = loc.getThing();
        //println("loc thing is " + thing);
        if(xmlCurrentThing != null && xmlCurrentThing.getMetadata().getPath() == thing.getMetadata().getPath()){
            //已经是当前的节点
            return;
        }
        
        if(xmlCurrentThing != thing){
            actionContext.g().put("xmlCurrentThing", thing);
            
            actions.doAction("initOutlineBrowser", actionContext, "descriptor", thing.getDescriptor(), "thing", thing);
            actions.doAction("initToobarMenu", actionContext,"thing", thing);
            actions.doAction("selectThing", actionContext, "thing", thing, "xmlEditorShowThing", true);
            actions.doAction("xmlEditorAddChildSetParent", actionContext, "parentThing", thing);            
            //设置属性编辑
            if(actionContext.get("xmlEditorNodeEditorActionContext") != null && xmlEditorNodeEditorActionContext.shell.isDisposed() == false){
                xmlEditorNodeEditorActionContext.actions.doAction("setThing", xmlEditorNodeEditorActionContext, "thing", thing);
            }
        }
    }else{
        println("loc is 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
                  xmlCompositeMouseDown
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@xmlTextSelection
                sname
                xmlTextSelection
                stype
                KeyDown
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlTextSelection
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@listeners/@xmlTextSelection/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
//println("selection");
import xworker.swt.util.SwtUtils;
if(SwtUtils.isRWT()){
    /*
    int line = xmlText.getCaretLineNumber() + 1;
    int column = xmlText.getCaretPosition();
  
    xmlEditorLineInfo.setText(line + ":" + column);
    xmlEditorLineInfo.getParent().update();
    */
}else{
    int line = xmlText.getLineAtOffset(xmlText.getCaretOffset()) + 1;
    int carOffset = xmlText.getCaretOffset();
    int lineOffset = xmlText.getOffsetAtLine(line - 1);
    int column =  (carOffset - lineOffset + 1);
    xmlEditorLineInfo.setText(line + ":" + column);
    xmlEditorLineInfo.getParent().update();
}
#$@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
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@xmlTextCodeAssistor
              sname
              xmlTextCodeAssistor
              sinitCache
              true
              sdescriptors
              xworker.swt.custom.StyledText/@CodeAssistor
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              xmlTextCodeAssistor
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlText/@xmlTextInteractiveUI
              sname
              xmlTextInteractiveUI
              slabel
              XML编辑器
              sregistThing
              xworker.swt.ide.worldexplorer.swt.dataExplorerParts.XMLEditDocIndex
              sregistType
              child
              sen_label
              XML Editor
              sen_group
              Thing Editor
              sdescriptors
              xworker.swt.Widgets/@InteractiveUI
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sgroup
              模型编辑器
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sid
              xmlTextInteractiveUI
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit
            sname
            xmlTextInit
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Local
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import xworker.swt.util.SwtUtils;

if(SwtUtils.isRWT()){
    return;
}else{
    try{
        initStyledText(actionContext);
    }catch(Exception e){    
    }
}
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            false
            sdebugLog
            false
            sdescriptors
            xworker.swt.widgets.Widget/@Code
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            xmlTextInit
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit/@ActionDefined
              sname
              ActionDefined
              sdescriptors
              xworker.lang.actions.Inout/@ActionDefined
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              ActionDefined
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit/@ActionDefined/@initStyledText
                sname
                initStyledText
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Local
                sdisableGlobalContext
                false
                Scode
#$@text#$@
import net.sf.colorer.ParserFactory;
import net.sf.colorer.swt.ColorManager;
import net.sf.colorer.swt.TextColorer;
import xworker.swt.form.TextEditor;
import xworker.swt.util.SwtUtils;
import xworker.swt.xworker.Colorer;
    
//设置着色
try{
    ParserFactory pf = Colorer.getParserFactory();  //new ParserFactory(world.getPath() + "/colorer/catalog.xml" );
    textColorer = new TextColorer(pf, new ColorManager());
    textColorer.attach(xmlText);
    textColorer.setCross(true, true);
    textColorer.setRegionMapper("default", true);
    textColorer.chooseFileType("xml.xml");
    
    TextEditor.attach(xmlText);
}catch(Throwable e){
    log.warn("Init colorer error");
}
#$@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
                initStyledText
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit/@ActionDefined/@initStyledText/@Variables
                  sname
                  Variables
                  sdescriptors
                  xworker.lang.actions.Inout/@Variables
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_fileMonitor
                  false
                  sth_mark
                  false
                  sid
                  Variables
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit/@ActionDefined/@initStyledText/@Variables/@log
                    sname
                    log
                    stagName
                    xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@xmlTextInit/@ActionDefined/@initStyledText
                    saction
                    true
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.core.actions.log.LoggerActions/@Sl4jLogger
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_fileMonitor
                    false
                    sth_mark
                    false
                    sid
                    log
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331
            sname
            xmlEditorBottomComposite
            sdescriptors
            xworker.swt.widgets.Composite
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            8331
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@xmlEditorButtonCompositeGridLayout
              sname
              xmlEditorButtonCompositeGridLayout
              snumColumns
              2
              smakeColumnsEqualWidth
              false
              smarginWidth
              5
              smarginHeight
              5
              smarginLeft
              0
              smarginTop
              0
              smarginRight
              0
              smarginBottom
              0
              shorizontalSpacing
              5
              sverticalSpacing
              5
              sdescriptors
              xworker.swt.Layouts/@GridLayout
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              xmlEditorButtonCompositeGridLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@xmlEditorButtonCompositeGridData
              sname
              xmlEditorButtonCompositeGridData
              sstyle
              FILL_HORIZONTAL
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              xmlEditorButtonCompositeGridData
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@xmlEditorLineInfo
              sname
              xmlEditorLineInfo
              sBORDER
              false
              stype
              HORIZONTAL
              salignment
              LEFT
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Label
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              xmlEditorLineInfo
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@xmlEditorLineInfo/@xmlEditorLineInfoGridData
                sname
                xmlEditorLineInfoGridData
                sstyle
                GRAB_HORIZONTAL
                shorizontalIndent
                0
                swidth
                -1
                sheight
                -1
                shorizontalAlignment
                BEGINNING
                sverticalAlignment
                CENTER
                shorizontalSpan
                1
                sverticalSpan
                1
                sgrabExcessHorizontalSpace
                false
                sgrabExcessVerticalSpace
                false
                sdescriptors
                xworker.swt.layout.LayoutDatas/@GridData
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditorLineInfoGridData
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331
              sname
              buttonComposite
              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
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Composite
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              8331
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@8333
                sname
                buttonCompositeRowLayout
                sfill
                false
                sjustify
                false
                smarginWidth
                0
                smarginHeight
                0
                smarginLeft
                3
                smarginTop
                3
                smarginRight
                3
                smarginBottom
                3
                spack
                true
                sspacing
                3
                stype
                SWT.HORIZONTAL
                swrap
                true
                sdescriptors
                xworker.swt.Layouts/@RowLayout
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                8333
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditorButtonCompositeGridData
                sname
                xmlEditorButtonCompositeGridData
                sstyle
                FILL_HORIZONTAL
                shorizontalIndent
                0
                swidth
                -1
                sheight
                -1
                shorizontalAlignment
                END
                sverticalAlignment
                CENTER
                shorizontalSpan
                1
                sverticalSpan
                1
                sgrabExcessHorizontalSpace
                false
                sgrabExcessVerticalSpace
                false
                sdescriptors
                xworker.swt.layout.LayoutDatas/@GridData
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditorButtonCompositeGridData
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton1
                sname
                xmlEditorSaveButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@xmlEditorSaveButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditAttributeButton1
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton1/@8336
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  8336
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton1/@8336/@8337
                    sname
                    returnToEditorButtonSelection
                    stype
                    Selection
                    sref
                    xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@actions/@save
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    8337
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@commandButton
                sname
                xmlEditorCommandButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@command
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                commandButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@commandButton/@Listeners
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  Listeners
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@commandButton/@Listeners/@commandButtonSelection
                    sname
                    commandButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    commandButtonSelection
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@commandButton/@Listeners/@commandButtonSelection/@GroovyAction
                      sname
                      GroovyAction
                      sisSynchronized
                      false
                      sthrowException
                      true
                      suseOtherAction
                      false
                      svarScope
                      Local
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import xworker.swt.ide.assistor.Assistor;

def editorCommandDomain = world.getThing("xworker.swt.ide.worldexplorer.swt.command.XmlEditorCommandDomain");
Assistor.runCommandDomain(editorCommandDomain, actionContext);

def thing = actions.doAction("xmlEditorGetSelectThing", actionContext);
actions.doAction("xmlEditorShowThing", actionContext, "thing", thing);
#$@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
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton2
                sname
                xmlEditAddAttributeButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@xmlEditAddAttributeButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditAttributeButton2
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton2/@8336
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  8336
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton2/@8336/@8337
                    sname
                    returnToEditorButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    8337
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton2/@8336/@8337/@xmlTextKeyDownJava
                      sname
                      xmlTextKeyDownJava
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.swt.ide.xmleditor.ThingXmlEditorActions
                      smethodName
                      addAttribute
                      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
                      xmlTextKeyDownJava
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAddChildButton
                sname
                xmlEditAddChildButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@xmlEditAddChildButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditAddChildButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAddChildButton/@8336
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  8336
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAddChildButton/@8336/@8337
                    sname
                    returnToEditorButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    8337
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAddChildButton/@8336/@8337/@GroovyAction
                      sname
                      GroovyAction
                      sisSynchronized
                      false
                      sthrowException
                      true
                      suseOtherAction
                      false
                      svarScope
                      Local
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.codes.XmlCoder;

import xworker.swt.ide.xmleditor.ThingXmlEditorActions;
import xworker.swt.util.SwtDialog;

if(actionContext.get("xmlAddChildActionContext") != null && xmlAddChildActionContext.shell.isDisposed() == false){
    xmlAddChildActionContext.shell.setFocus();
    return;
}

//获取xml文档
def doc = ThingXmlEditorActions.getThingXmlDocument(xmlText, actionContext);
doc.parse(xmlText.getText(), xmlRootThing.getMetadata().getPath());
def loc = ThingXmlEditorActions.getXmlThingLocation(xmlText, doc);
if(loc != null){
    //创建编辑对话框
    def ac = new ActionContext();
    ac.put("parent", xmlText.getShell());
    ac.put("thing", loc.getThing());
    ac.put("xmlText", xmlText);
    ac.put("parentContext", actionContext);
    ac.put("parentActions", actions);
    def shellThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.XmlEditorAddChildDialog");
    def shell = shellThing.doAction("create", ac);
    ac.actions.doAction("setThing", ac);
    //shell.pack();
    
    //焦点设置到xmlText，这样添加子节点窗口关闭后好恢复
    xmlText.setFocus();
    
    //定位了innerOutLine的位置上
    def iloc = innerOutline.toDisplay(innerOutline.getLocation());
    iloc.y = iloc.y + 200;
    shell.setLocation(iloc);
    shell.setVisible(true);
    shell.setFocus();
    
    //保存添加子节点的变量上下文
    actionContext.g().put("xmlAddChildActionContext", 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
                      GroovyAction
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton
                sname
                xmlEditAttributeButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@xmlEditAttributeButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                xmlEditAttributeButton
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton/@8336
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  8336
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton/@8336/@8337
                    sname
                    returnToEditorButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    8337
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@xmlEditAttributeButton/@8336/@8337/@GroovyAction
                      sname
                      GroovyAction
                      sisSynchronized
                      false
                      sthrowException
                      true
                      suseOtherAction
                      false
                      svarScope
                      Local
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.codes.XmlCoder;

import xworker.swt.ide.xmleditor.ThingXmlEditorActions;
import xworker.swt.util.SwtDialog;

//已经打开了
if(actionContext.get("xmlEditorNodeEditorActionContext") != null && xmlEditorNodeEditorActionContext.shell.isDisposed() == false){
    xmlEditorNodeEditorActionContext.shell.setFocus();
    return;
}

//获取xml文档
def doc = ThingXmlEditorActions.getThingXmlDocument(xmlText, actionContext);
doc.parse(xmlText.getText(), xmlRootThing.getMetadata().getPath());
def loc = ThingXmlEditorActions.getXmlThingLocation(xmlText, doc);
if(loc != null){
    //创建编辑对话框
    def ac = new ActionContext();
    ac.put("parent", xmlText.getShell());
    ac.put("thing", loc.getThing());
    ac.put("xmlText", xmlText);
    def shellThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.XmlEditorEditThingDialog");
    def shell = shellThing.doAction("create", ac);
    ac.actions.doAction("setThing", ac);
    //shell.pack();
    shell.setVisible(true);
    
    //保存上下文
    actionContext.g().put("xmlEditorNodeEditorActionContext", 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
                      GroovyAction
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@8334
                sname
                returnToEditorButton
                stext
                label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@returnToEditorButton1
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                sselected
                false
                scapture
                false
                senabled
                true
                sredraw
                true
                svisible
                true
                sdescriptors
                xworker.swt.Widgets/@Button
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                8334
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@8334/@8336
                  sname
                  Listeners
                  sdescriptors
                  xworker.swt.widgets.Widget/@Listeners
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  8336
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@8334/@8336/@8337
                    sname
                    returnToEditorButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    8337
                      @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@xmlComposite/@8331/@8331/@8334/@8336/@8337/@GroovyAction
                      sname
                      GroovyAction
                      sisSynchronized
                      false
                      sthrowException
                      true
                      suseOtherAction
                      false
                      svarScope
                      Local
                      sdisableGlobalContext
                      false
                      scode
                      actions.doAction("editorChangeType", actionContext);
                      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
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite
          sname
          guideComposite
          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
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Composite
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          guideComposite
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@guideCompositeGridLayout
            sname
            guideCompositeGridLayout
            snumColumns
            2
            smakeColumnsEqualWidth
            false
            smarginWidth
            5
            smarginHeight
            5
            smarginLeft
            0
            smarginTop
            0
            smarginRight
            0
            smarginBottom
            0
            shorizontalSpacing
            5
            sverticalSpacing
            5
            sdescriptors
            xworker.swt.Layouts/@GridLayout
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            guideCompositeGridLayout
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@titleLabel
            sname
            guideTitleLabel
            sBORDER
            false
            stype
            HORIZONTAL
            salignment
            LEFT
            stext
            标题
            scapture
            false
            senabled
            true
            sfont
            "|10|1|#000000"
            sredraw
            true
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Label
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            titleLabel
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@titleLabel/@titleLabelGridData
              sname
              titleLabelGridData
              sstyle
              FILL_HORIZONTAL
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              2
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              titleLabelGridData
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@contentComposite
            sname
            guideContentComposite
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Composite
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            contentComposite
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@contentComposite/@contentCompositeFillLayout
              sname
              contentCompositeFillLayout
              stype
              SWT.HORIZONTAL
              sdescriptors
              xworker.swt.Layouts/@FillLayout
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              contentCompositeFillLayout
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@contentComposite/@contentCompositeGridData
              sname
              contentCompositeGridData
              sstyle
              FILL_BOTH
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              2
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              contentCompositeGridData
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@18255
            sname
            guideButtonComposite
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Composite
            sid
            18255
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@18255/@18256
              sname
              buttonCompositeGridData
              sstyle
              FILL_HORIZONTAL
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              BEGINNING
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sid
              18256
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@18255/@18257
              sname
              buttonCompositeRowLayout
              sfill
              false
              sjustify
              false
              smarginWidth
              0
              smarginHeight
              0
              smarginLeft
              3
              smarginTop
              3
              smarginRight
              3
              smarginBottom
              3
              spack
              true
              sspacing
              3
              stype
              SWT.HORIZONTAL
              swrap
              true
              sdescriptors
              xworker.swt.Layouts/@RowLayout
              sid
              18257
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551
            sname
            guideButtonEditComposite
            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
            svisible
            true
            sdescriptors
            xworker.swt.Widgets/@Composite
            sid
            182551
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@18256
              sname
              buttonCompositeGridData
              sstyle
              GRAB_HORIZONTAL
              shorizontalIndent
              0
              swidth
              -1
              sheight
              -1
              shorizontalAlignment
              END
              sverticalAlignment
              CENTER
              shorizontalSpan
              1
              sverticalSpan
              1
              sgrabExcessHorizontalSpace
              false
              sgrabExcessVerticalSpace
              false
              sdescriptors
              xworker.swt.layout.LayoutDatas/@GridData
              sid
              18256
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@18257
              sname
              buttonCompositeRowLayout
              sfill
              false
              sjustify
              false
              smarginWidth
              0
              smarginHeight
              0
              smarginLeft
              3
              smarginTop
              3
              smarginRight
              3
              smarginBottom
              3
              spack
              true
              sspacing
              3
              stype
              SWT.HORIZONTAL
              swrap
              true
              sdescriptors
              xworker.swt.Layouts/@RowLayout
              sid
              18257
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetNodeButton
              sname
              guideResetNodeButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Guide/@resetNodeButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              resetNodeButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetNodeButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetNodeButton/@Listeners/@editGuideNodeButtonSelection
                  sname
                  resetNodeButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  editGuideNodeButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetNodeButton/@Listeners/@editGuideNodeButtonSelection/@Ognl
                    sname
                    Ognl
                    sexpression
                    thingGuide.resetNode()
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.Actions/@Ongl
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    Ognl
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetGuideButton
              sname
              guideResetGuideButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Guide/@resetGuideButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              resetGuideButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetGuideButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetGuideButton/@Listeners/@editGuideNodeButtonSelection
                  sname
                  resetNodeButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  editGuideNodeButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@resetGuideButton/@Listeners/@editGuideNodeButtonSelection/@Ognl
                    sname
                    Ognl
                    sexpression
                    thingGuide.reset()
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.lang.actions.Actions/@Ongl
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    Ognl
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton11
              sname
              selectGuidButton
              stext
              lang:d=选择向导&en=Select Guide
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              spack
              false
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              editGuideNodeButton11
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton11/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton11/@Listeners/@editGuideNodeButtonSelection
                  sname
                  editGuideNodeButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  editGuideNodeButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton11/@Listeners/@editGuideNodeButtonSelection/@cancelGuideButton
                    sname
                    selectGuideButton
                    sisSynchronized
                    false
                    sthrowException
                    true
                    suseOtherAction
                    false
                    svarScope
                    Local
                    sdisableGlobalContext
                    false
                    scode
                    thingGuide.setNewGuideThing( world.getThing("xworker.core.util.ThingGuideSelector"));
                    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
                    cancelGuideButton
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton
              sname
              guideEdiNodeButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Guide/@editGuideNodeButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              editGuideNodeButton
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton/@Listeners/@editGuideNodeButtonSelection
                  sname
                  editGuideNodeButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  editGuideNodeButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton/@Listeners/@editGuideNodeButtonSelection/@ideOpenThing
                    sname
                    ideOpenThing
                    sthing
                    ognl:thingGuide.currentNode
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.core.actions.utils.XWorkerActions/@ideOpenThing
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    ideOpenThing
              @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton1
              sname
              guideCancelButton
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Guide/@cancelGuideButton
              stype
              SWT.PUSH
              sflat
              false
              sborder
              false
              sselected
              false
              scapture
              false
              senabled
              true
              sredraw
              true
              svisible
              true
              sdescriptors
              xworker.swt.Widgets/@Button
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              editGuideNodeButton1
                @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton1/@Listeners
                sname
                Listeners
                sdescriptors
                xworker.swt.widgets.Widget/@Listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                Listeners
                  @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton1/@Listeners/@editGuideNodeButtonSelection
                  sname
                  editGuideNodeButtonSelection
                  stype
                  Selection
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  editGuideNodeButtonSelection
                    @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@182551/@editGuideNodeButton1/@Listeners/@editGuideNodeButtonSelection/@cancelGuideButton
                    sname
                    cancelGuideButton
                    sisSynchronized
                    false
                    sthrowException
                    true
                    suseOtherAction
                    false
                    svarScope
                    Local
                    sdisableGlobalContext
                    false
                    scode
                    thingGuide.cancel();
                    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
                    cancelGuideButton
            @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@InteractiveUI
            sname
            InteractiveUI
            slabel
            模型编辑向导
            sregistThing
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@guideComposite/@InteractiveUI
            sregistType
            notes
            spriority
            0
            Sdescription
#$@text#$@
<p><strong>模型编辑向导</strong></p>

<p>&nbsp;&nbsp;&nbsp; 按照向导界面一步一步编辑模型。</p>

<p><strong>创建模型向导</strong></p>

<p>&nbsp;&nbsp;&nbsp; 创建模型时选择模型向导(ThingGuide)，具体参看ThingGuide模型。</p>

<p><span style="color: rgb(255, 0, 0);"><strong>操作不可退回</strong></span></p>

<p>&nbsp;&nbsp;&nbsp; 模型向导框架本身没有设计重做和撤销等功能，因此向导的每一步操作可能都是对模型的实质性的不可撤销的操作。</p>

<p>&nbsp;&nbsp;&nbsp; 如果想实现具有redo和undo功能的向导，需要具体的向导去实现了。</p>

<p>&nbsp;</p>
#$@text#$@
            sen_group
            Thing Editor
            sdescriptors
            xworker.swt.Widgets/@InteractiveUI
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sgroup
            模型编辑器
            sth_fileMonitor
            false
            sth_deprecated
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sid
            InteractiveUI
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@editPartCompositeStackLayout
          sname
          editPartCompositeStackLayout
          stopControl
          contentEditComposite
          slabel
          editPartCompositeStackLayout
          sdescriptors
          xworker.swt.Layouts/@StackLayout
          sid
          editPartCompositeStackLayout
          @/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@ThingEditorFormUI
          sname
          ThingEditorFormUI
          slabel
          编辑区域
          scommandIndex
          xworker.ide.worldexplorer.swt.help.commander.ThingEditorForm
          spriority
          0
          sen_label
          Edit Area
          sen_group
          Thing Editor
          sdescriptors
          xworker.swt.Widgets/@InteractiveUI
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_noThingRegistViewer
          false
          sgroup
          模型编辑器
          sth_fileMonitor
          false
          sth_deprecated
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          snotXmlAttribute
          false
          sjson_isArray
          false
          sid
          ThingEditorFormUI
    @/@rightComposite/@zestGraphComposite
    sname
    zestGraphComposite
    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
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Composite
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    zestGraphComposite
      @/@rightComposite/@zestGraphComposite/@actions
      sname
      actions
      sdescriptors
      xworker.lang.MetaThing/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@rightComposite/@zestGraphComposite/@actions/@create
        sname
        create
        sdescriptors
        xworker.lang.actions.Actions/@NOOP
        sdescription
        <p>先暂时不要创建了。</p>
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        create
      @/@rightComposite/@zestGraphComposite/@zestGraphCompositeGridLayout
      sname
      zestGraphCompositeGridLayout
      smakeColumnsEqualWidth
      false
      smarginWidth
      5
      smarginHeight
      5
      smarginLeft
      0
      smarginTop
      0
      smarginRight
      0
      smarginBottom
      0
      shorizontalSpacing
      5
      sverticalSpacing
      5
      sdescriptors
      xworker.swt.Layouts/@GridLayout
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      zestGraphCompositeGridLayout
      @/@rightComposite/@zestGraphComposite/@zestGraph
      sname
      zestGraph
      sdescriptors
      xworker.swt.Widgets/@Graph
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      zestGraph
        @/@rightComposite/@zestGraphComposite/@zestGraph/@LayoutAlgorithms
        sname
        LayoutAlgorithms
        sdescriptors
        xworker.draw2d.zest.model.Graph/@Layouts
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        LayoutAlgorithms
          @/@rightComposite/@zestGraphComposite/@zestGraph/@LayoutAlgorithms/@TreeLayoutAlgorithm
          sname
          TreeLayoutAlgorithm
          sdescriptors
          xworker.draw2d.zest.model.layouts.Layouts/@TreeLayoutAlgorithm
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          TreeLayoutAlgorithm
        @/@rightComposite/@zestGraphComposite/@zestGraph/@zestGraphGridData
        sname
        zestGraphGridData
        sstyle
        FILL_BOTH
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        sdescriptors
        xworker.swt.layout.LayoutDatas/@GridData
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        zestGraphGridData
      @/@rightComposite/@zestGraphComposite/@8331
      sname
      zestButtonComposite
      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
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Composite
      sid
      8331
        @/@rightComposite/@zestGraphComposite/@8331/@8332
        sname
        buttonCompositeGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        END
        sverticalAlignment
        CENTER
        shorizontalSpan
        1
        sverticalSpan
        1
        sgrabExcessHorizontalSpace
        false
        sgrabExcessVerticalSpace
        false
        sdescriptors
        xworker.swt.layout.LayoutDatas/@GridData
        sid
        8332
        @/@rightComposite/@zestGraphComposite/@8331/@8333
        sname
        buttonCompositeRowLayout
        sfill
        false
        sjustify
        false
        smarginWidth
        0
        smarginHeight
        0
        smarginLeft
        3
        smarginTop
        3
        smarginRight
        3
        smarginBottom
        3
        spack
        true
        sspacing
        3
        stype
        SWT.HORIZONTAL
        swrap
        true
        sdescriptors
        xworker.swt.Layouts/@RowLayout
        sid
        8333
        @/@rightComposite/@zestGraphComposite/@8331/@8334
        sname
        returnToEditorButton
        stext
        返回
        stype
        SWT.PUSH
        sflat
        false
        sborder
        false
        sselected
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Button
        sth_createIndex
        false
        sid
        8334
          @/@rightComposite/@zestGraphComposite/@8331/@8334/@8335
          sname
          RowData
          sexclude
          false
          swidth
          80
          sheight
          -1
          sdescriptors
          xworker.swt.layout.LayoutDatas/@RowData
          sth_createIndex
          false
          sid
          8335
          @/@rightComposite/@zestGraphComposite/@8331/@8334/@8336
          sname
          Listeners
          sdescriptors
          xworker.swt.widgets.Widget/@Listeners
          sth_createIndex
          false
          sid
          8336
            @/@rightComposite/@zestGraphComposite/@8331/@8334/@8336/@8337
            sname
            returnToEditorButtonSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sth_createIndex
            false
            sid
            8337
              @/@rightComposite/@zestGraphComposite/@8331/@8334/@8336/@8337/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              svarScope
              Local
              sdisableGlobalContext
              false
              Scode
#$@text#$@
contentEditCompositeStackLayout.topControl = contentComposite;
mainComposite.layout();
#$@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
    @/@rightComposite/@rightCompositeStackLayout
    sname
    contentEditCompositeStackLayout
    stopControl
    contentComposite
    slabel
    contentEditCompositeStackLayout
    sdescriptors
    xworker.swt.Layouts/@StackLayout
    sid
    rightCompositeStackLayout
    @/@rightComposite/@3014
    sname
    RunAction
    sdescriptors
    xworker.swt.xworker.RunAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    3014
      @/@rightComposite/@3014/@initCode
      sname
      initCode
      sthrowException
      true
      suseOtherAction
      false
      suseOuterJava
      true
      suseInnerJava
      false
      souterClassName
      xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
      smethodName
      initCode
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import xworker.swt.editor.LabelToolTipListener;
import xworker.swt.editor.EditorModifyListener;
import xworker.swt.ide.worldexplorer.editor.OutlineTreeMoveListener;
import xworker.swt.util.SwtUtils;

def menuCollItemSize = menuCoolItem.getSize();
menuCollItemSize.x = 1000;
menuCoolItem.setMinimumSize(menuCollItemSize);

if(SwtUtils.isRWT() == false){
    titleLabel.addMouseTrackListener(LabelToolTipListener.getInstance());
}
titleLabel.addMouseListener(LabelToolTipListener.getInstance());

modifyListener = new EditorModifyListener(actions);

//设置默认编辑类型
def globalConfig = world.getThing("_local.xworker.config.GlobalConfig");
if(globalConfig != null){
    if(globalConfig.getString("thingEditorDefaultMode") == "xml"){
        editPartCompositeStackLayout.topControl = xmlComposite;
        editPartComposite.layout();
    }
}

//树的概要栏的鼠标移动事件的监听
OutlineTreeMoveListener moveListener = new OutlineTreeMoveListener(innerOutline, actionContext);
actionContext.g().put("innerOutlineMoveListener", moveListener);

def dialogThing = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.MarkTreeDialog");
if(dialogThing == null){
    viewMarkButton.dispose();
    markButton.dispose();
    guideButton.dispose();
    assistCoolItem.dispose();
}
#$@text#$@
      sattributeTemplate
      false
      sinterpretationType
      Action
      svarScope
      Global
      screateLocalVarScope
      false
      ssaveReturn
      false
      sdebugLog
      false
      sdescriptors
      xworker.lang.actions.JavaAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      initCode
    @/@rightComposite/@thingEditorInteractiveUI
    sname
    thingEditorInteractiveUI
    slabel
    模型编辑器
    sregistThing
    xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@thingEditorInteractiveUI
    sregistType
    child
    spriority
    0
    Sdescription
#$@text#$@
<h2>模型编辑器</h2>

<p>&nbsp;&nbsp;&nbsp; 用于编辑和运行具体的模型。</p>

<h3>编辑模型的方法&nbsp;</h3>

<p>&nbsp;&nbsp;&nbsp; 如要学习如何在模型编辑器中编辑模型，请参看教程（<strong>动态模型-&gt;编辑模型-&gt;编辑模型）</strong>，教程可以在工作台的帮助菜单中打开。&nbsp;&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<ul>
</ul>
#$@text#$@
    sen_label
    Thing Editor
    sen_group
    Thing Editor
    sdescriptors
    xworker.swt.Widgets/@InteractiveUI
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sgroup
    模型编辑器
    sth_fileMonitor
    false
    sth_deprecated
    false
    Sen_description
#$@text#$@
<h2>Model Editor</h2>

<p>&nbsp;&nbsp;&nbsp; Used to edit and run specific models. </p>

<h3>How to edit a model&nbsp;</h3>

<p>&nbsp;&nbsp;&nbsp; To learn how to edit a model in the Model Editor, please see the tutorial (<strong>Dynamic Model-&gt;Edit Model-&gt;Edit Model)</strong>, the tutorial can be worked on Open the Help menu of the desk. &nbsp;&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<ul>
</ul>
#$@text#$@
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    thingEditorInteractiveUI
    @/@rightComposite/@6425
    sname
    DataStores
    sdescriptors
    xworker.swt.Widgets/@DataStores
    sinheritDescription
    false
    sth_author
    __designer_auto_manager__
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    6425
  @/@actions
  sname
  actions
  slabel
  ThingEditorActions
  sdescriptors
  xworker.swt.Widgets/@actions
  sinheritDescription
  false
  sth_createIndex
  true
  sth_registThing
  child|xworker.lang.ActionContainers
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sgroup
  xworker.ide
  sth_fileMonitor
  false
  sth_deprecated
  false
  sth_mark
  true
  sth_font
  "|10|1|#000000"
  sth_nodeColor
  DARK_MAGENTA
  sth_registQueryOnlySelf
  false
  sid
  actions
    @/@actions/@checkDataObject
    sname
    checkThing
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    checkThing
    sdisableGlobalContext
    false
    sdescription
    <p>检查事物是否还存在。</p>
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

/*
暂时删除检测，有bug存在，2013-04-01
if(thing.metadata.isRemoved()){
    MessageBox box = new MessageBox(innerOutline.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_WARNING);
    box.setMessage("事物文件已更新或者节点已经被删除，是否要重新读取？");
    box.setText("警告");
    if(SWT.OK == box.open()){
        actionContext.getScope(0).put("rootLastModified", currentThing.getRoot().getMetadata().getLastModified());
        outlineTree.select(innerOutline.getItems()[0]);
        refreshMenuSelection.handleEvent(null);
        dataThingCache.clear();    
        dataCache.clear();
        actions.doAction("modify", ["setModified":false]);
        return "changed";
    }
}*/

def key = "__checking_thing__";
//查看事物是否在外部被改变了
if(actionContext.get(key) == null && actionContext.get("thingEntry") != null && thingEntry.isChanged()){    
    //刷新编辑器的事物时间，避免再次重新刷新
    try{
        //log.info("lastmodified=" + thingEntry.getThing().getMetadata().getLastModified());
        actionContext.push().put(key, true);
        thingEntry.getThing();
        
        def treeItem = innerOutline.getItems()[0];
        def thing = treeItem.getData();
        actionContext.peek().put("disableOpenThingAfterRefresh", true);
        actions.doAction("refreshOutline", actionContext, "refreshThing", thing);
        
        return "changed";
    }finally{
        actionContext.pop();
    }
}

thing = world.getThing(thing.metadata.path);
if(thing == null){
    //节点已经被删除
    showErr(actionContext, "message", "节点已经被删除！");
    
    return null;
}else{    
    return thing;
}
#$@text#$@
    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
    checkDataObject
      @/@actions/@checkDataObject/@ActionDefined
      sname
      ActionDefined
      sdescriptors
      xworker.lang.actions.Inout/@ActionDefined
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ActionDefined
        @/@actions/@checkDataObject/@ActionDefined/@showErr
        sname
        showErr
        sshell
        ognl:mainComposite.getShell()
        sicon
        ICON_ERROR
        sbuttons
        OK
        stitle
        lang:d=检查事物&en=Check Thing
        smessage
        var:message
        sinterpretationType
        Self
        sattributeTemplate
        false
        schildsAttributeTemplate
        false
        svarScope
        Local
        sisSynchronized
        false
        sthrowException
        true
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdisableGlobalContext
        false
        sdebugLog
        false
        sdescriptors
        xworker.swt.actions.MessageBoxActions/@MessageBox
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        showErr
    @/@actions/@openDataObject
    sname
    openThing
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    openThing
    sdisableGlobalContext
    false
    sdescription
    <p>打开当前概要树选中的节点的事物编辑。</p>
    Scode
#$@text#$@
import org.xmeta.World;
import org.xmeta.Thing;

import org.xmeta.util.UtilData;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.MessageBox;

import java.util.HashMap;

import xworker.swt.ide.assistor.Assistor;


//long start = System.currentTimeMillis();
def treeItem = innerOutline.getSelection()[0];
def treeThing = treeItem.getData();
//检测节点是否存在
treeThing = actions.doAction("checkThing", ["thing":treeThing]);
if(treeThing instanceof String){
    return;
}
if(treeThing == null){
    treeItem.dispose();
    return;
}

println treeThing;
treeItem.setData(treeThing);
def currentThing = actionContext.get("currentThing");
if(treeThing == currentThing){
    //return;
}else if(currentThing != null && actions.doAction("isXmlEditor", actionContext) && actionContext.get("modified") == true){
    if(actions.doAction("save") == false){
         return ;
    }
}

//情况添加子事物的面板和按钮状态
addChildButton.setEnabled(false);
for(childControl in childContentComposite.getChildren()){
    childControl.dispose();
}

//保存当前事物的编辑缓存
actions.doAction("saveEditCache");

//def treeItem = outlineTree.getSelection()[0];
if(innerOutline.getSelection().length == 0){
    if(innerOutline.getItems() != null && innerOutline.getItems().length > 0){
        innerOutline.select(innerOutline.getItems()[0]);
    }else{
        return;
    }
}

currentThing = treeThing;
actionContext.getScope(0).put("currentThing", currentThing);
actionContext.getScope(0).put("currentItem", treeItem);
actionContext.getScope(0).put("rootLastModified", currentThing.getRoot().getMetadata().getLastModified());

//初始化描述者
if(menuBarComposite != null && !menuBarComposite.isDisposed()){
    descriptorsCombo.removeAll();
    structCombo.removeAll();
    def structures = treeThing.getDescriptors();
    def childComboDatas = [];
    for(str in structures){
        childComboDatas.add(str);
    }
    descriptorsCombo.setData(structures);
    structCombo.setData(childComboDatas);
    for(struct in structures){
        descriptorsCombo.add(struct.metadata.label);
    }
    for(struct in childComboDatas){
        structCombo.add(struct.metadata.label);
    }
    childComboDatas.add(world.getThing("xworker.core.util.ThingTemplate"));
    //初始化继承
    def exts = treeThing.getExtends();
    extendsCombo.setData(exts);
    extendsCombo.removeAll();
    for(ext in exts){
        extendsCombo.add(ext.metadata.label);
    }
    
    //初始化方法列表
    methodsCombo.removeAll();
    def scriptObjects = treeThing.getActionsThings();
    def actionList = [];
    for(sobj in scriptObjects){        
        actionList.add(sobj.metadata.name);
    }
    Collections.sort(actionList);
    for(action in actionList){
        methodsCombo.add(action);
    }
    methodsCombo.setData(scriptObjects);
    
    //选择默认的节点
    descriptorsCombo.select(0);
    structCombo.select(0);
}

//log.info("初始化：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();

//初始化编辑表单
if(editPartCompositeStackLayout.topControl == guideComposite){
    //不能设置为取消，否则会递归，向导现在默认取消，以后可能会有其他动作
    //thingGuide.cancel();
    //editPartCompositeStackLayout.topControl = contentEditComposite;
   // editPartComposite.layout();
}else if(!actions.doAction("isXmlEditor", actionContext)){
    //表单编辑
    descriptSelection.handleEvent(null);  
}else{    
    //xml编辑器
    actions.doAction("xmlSetCurrentThing", actionContext);    
}
//log.info("打开编辑表单：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();

//初始化添加子节点
//由于子节点需要通过点击按钮才能看见，因此默认不初始化
actionContext.getScope(0).put("doInitChildTree", false);
descriptsComboSelection.handleEvent(null);

//切换到编辑界面
if(editPartCompositeStackLayout.topControl == addChildSashForm){
	editPartCompositeStackLayout.topControl = contentEditComposite;
	editPartComposite.layout();
}
//log.info("打开编辑表单2：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();
//编辑缓存
def data = dataCache.get(currentThing.metadata.path)
if(data != null){
    if(data.time < currentThing.metadata.lastModified){
         clearCache(actionContext, "dataCache", dataCache);
         /*
         MessageBox box = new MessageBox(structCombo.getShell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION);
         box.setText("操作信息");
         box.setMessage("当前事物比已修改的内容要新，是否放弃修改？");
         if(SWT.YES == box.open()){
             //刷新当前节点
             dataCache.clear();
             return;
         }*/
    }
    def attrs = [:];
    attrs.putAll(currentThing.getAttributes());
    attrs.putAll(data.data);
    currentModelContext.put("thingAttributes", attrs);
    currentModel.doAction("setValue", currentModelContext);
}

//通知辅助者
//Assistor.thingEditorThingSelected(null, treeItem, thing, actionContext, actions);
innerOutlineInteractiveUI.fire(currentThing);

//onNodeSelected事件
if(actionContext.get("editorThing") != null && actionContext.get("editorThingContext") != null){
    //println("xxxxxxxxxxxxxxxxxx=" + editorThing.metadata.path);
    editorThing.doAction("onNodeSelected", editorThingContext, "thing", currentThing); 
}else{
    //println "editorThing=" + actionContext.get("editorThing");
    //println "editorThingContext=" + actionContext.get("editorThingContext");
}
//log.info("处理其他：" + (System.currentTimeMillis() - start));
//start = System.currentTimeMillis();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    openDataObject
      @/@actions/@openDataObject/@ActionDefined
      sname
      ActionDefined
      sdescriptors
      xworker.lang.actions.Inout/@ActionDefined
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ActionDefined
        @/@actions/@openDataObject/@ActionDefined/@showErr
        sname
        clearCache
        sshell
        ognl:mainComposite.getShell()
        sicon
        ICON_QUESTION
        sbuttons
        OK | CANCEL
        stitle
        lang:d=事物在外部已修改&en=Thing Has Modified
        svariables
        dataCache
        smessage
        lang:d=当前事物比已修改的内容要新，是否放弃修改？&en=Current thing has changed, reload?
        sinterpretationType
        Self
        sattributeTemplate
        false
        schildsAttributeTemplate
        false
        svarScope
        Local
        sisSynchronized
        false
        sthrowException
        true
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdisableGlobalContext
        false
        sdebugLog
        false
        sdescriptors
        xworker.swt.actions.MessageBoxActions/@MessageBox
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        showErr
          @/@actions/@openDataObject/@ActionDefined/@showErr/@actions
          sname
          actions
          sdescriptors
          xworker.swt.actions.MessageBoxActions/@MessageBox/@actions1
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          actions
            @/@actions/@openDataObject/@ActionDefined/@showErr/@actions/@ok
            sname
            ok
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            suseOuterJava
            true
            suseInnerJava
            false
            souterClassName
            xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
            smethodName
            openThingClearCacheOk
            sdisableGlobalContext
            false
            scode
            dataCache.clear();
            sattributeTemplate
            false
            sinterpretationType
            Action
            svarScope
            Local
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.JavaAction
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            ok
      @/@actions/@openDataObject/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      ins
        @/@actions/@openDataObject/@ins/@thing
        sname
        thing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        thing
    @/@actions/@setDataObject
    sname
    setThing
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.cache.ThingEntry;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.TreeItem;

//判断当前编辑的事物是不是同一个事物，如果是同一个则不用刷新的
if(innerOutline.getItems().length != 0 && innerOutline.getItems()[0].getData() == thing){
    return;
}

//保存thingEntry，用于判断是否在外部修改了
def thingEntry = new ThingEntry(thing);
//log.info("lastmodified=" + thing.getMetadata().getLastModified());
actionContext.g().put("thingEntry", thingEntry);

//初始化新的概要数
for(item in innerOutline.getItems()){
    item.dispose();
}
actions.doAction("clearCache");
actionContext.getScope(0).put("innerOutlineExpandCache", [:]);

def treeItem = new TreeItem(innerOutline, SWT.NONE);
actions.doAction("initOutlineTreeItem", actionContext, ["thing": thing, "treeItem": treeItem]);
//def initOutline = new Thing("xworker.swt.ide.worldexplorer.swt.actions.OutlineTreeAction/@InitOutlineTree");
//initOutline.doAction("run", actionContext, ["tree": innerOutline, "thing": thing]);

//是否能够保存
def thingManager = thing.getMetadata().getThingManager();
if(thingManager != null && !thingManager.isSaveable()){
    okItem.setEnabled(false);
    deleteItem.setEnabled(false);
    moveUpItem.setEnabled(false);
    moveDownItem.setEnabled(false);
}else{
    okItem.setEnabled(true);
    deleteItem.setEnabled(true);
    moveUpItem.setEnabled(true);
    moveDownItem.setEnabled(true);    
}

if(thing.isTransient() && !titleLabel.isDisposed()){
    titleLabel.setForeground(mainComposite.getDisplay().getSystemColor(SWT.COLOR_RED));
}

//下面两个方法加入到asyncExec中，因为不在里面由于未知原因ubuntu下会崩溃
def innerOutline= innerOutline;
def actions = actions;
def thing = thing;
def actionContext = actionContext;
innerOutline.getDisplay().asyncExec({
   //默认选择根结点的数据
   innerOutline.setSelection(innerOutline.getItems()[0]);
   actions.doAction("selectThing", actionContext, ["refresh": true, "thing": thing]);
   //innerOutline.notifyListeners(SWT.Selection, null); //触发选择事件
});
/*
//初始化概要树
innerOutline.removeAll();
def refreshAction = world.getAction("xworker.swt.ide.worldexplorer.swt.shareScript.ThingEditor/@scripts/@initOutline");
refreshAction.run(null, ["tree":outlineTree, "thing":thing, "itemIndex":null]);
outlineTree.setSelection(innerOutline.getItems()[0]);
*/
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setDataObject
      @/@actions/@setDataObject/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      ins
        @/@actions/@setDataObject/@ins/@thing
        sname
        thing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        thing
        @/@actions/@setDataObject/@ins/@selectedThing
        sname
        selectedThing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        selectedThing
    @/@actions/@selectDataObject
    sname
    selectThing
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    selectThing
    sdisableGlobalContext
    false
    Sdescription
#$@text#$@
<p>选择一个事物的节点。</p>
<p>参数:</p>
<p>&nbsp;&nbsp;&nbsp; thing：要选择的事物。</p>
<p>&nbsp;&nbsp;&nbsp; refresh：true/false，选择前是否要先刷新整个树，默认true即使没有设置。</p>
#$@text#$@
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;

def thing = actionContext.get("thing");
//println "select thing=" + thing;
if(thing == null) return;

if(thing instanceof String){
    def root = innerOutline.getItems()[0].getData();
    def thingPath = thing;
    thing = root.getThing(thingPath);
    if(thing == null){
        thing = world.getThing(thingPath);
    }
    if(thing == null){
        log.info("thing not exists, path=" + thingPath);
        return;
    }
}

if(actionContext.get("refresh") == true){    
    innerOutline.setSelection(innerOutline.getItems()[0]);
    refreshMenuSelection.handleEvent(null);
}

def currentThing = actionContext.get("currentThing");
if(currentThing == thing){
    return;
}else{
    actionContext.g().put("currentThing", thing);
}

def it = null;
for(item in innerOutline.getItems()){
    it = getItem(thing, item);
    if(it != null) break;
}

if(it != null && innerOutline.getSelection().length > 0 && (it != innerOutline.getSelection()[0] || actionContext.get("refresh") == true)){
    it.getParent().setSelection(it);	

    //如果是xml编辑器且是选择的xml中的子节点，那么不需要触发选择事件
    def notifyListener = true;
    if(actions.doAction("isXmlEditor") == true && actionContext.get("xmlEditorShowThing") == true){
        notifyListener = false;
        /*
        def xpath = xmlCurrentThing.getMetadata().getPath();
        def path = xmlRootThing.getMetadata().getPath();
        if(xpath == path || xpath.startsWith(path)){
            notifyListener = false;
        }*/
    }
    //println(notifyListener);
    if(notifyListener){
        it.getParent().notifyListeners(SWT.Selection, null);
    }
}

if(actions.doAction("isXmlEditor") == true){
}else{
    //可以从添加子节点的界面切换到编辑界面
    contentEditCompositeStackLayout.topControl = contentComposite;
    mainComposite.layout();
}
return actionContext;

def getItem(dataObj, item){
    if(item.getData().metadata.path == dataObj.metadata.path){
        return item;
    }
    
    for(subItem in item.getItems()){
        def it = getItem(dataObj, subItem);
        if(it != null) return it;
    }

    return null;
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    selectDataObject
      @/@actions/@selectDataObject/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@selectDataObject/@ins/@thing
        sname
        thing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
        @/@actions/@selectDataObject/@ins/@refresh
        sname
        refresh
        stype
        Boolean
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        refresh
    @/@actions/@save
    sname
    save
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    save
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;

import org.xmeta.util.UtilData;
import org.xmeta.codes.XmlCoder;
import org.xmeta.Thing;

import xworker.swt.util.ThingBackupUtil;

//阻止保存时出现的递归
if(actionContext.get("stopSaving") || actionContext.get("currentThing") == null){
    return;
}

if(editPartCompositeStackLayout.topControl == xmlComposite){
    //在XML的编辑状态下
    try{
        //从XML中读取事物
        def thing = new Thing();
        XmlCoder.parse(thing, xmlText.getText());
        
        //使用当前事物覆盖当前节点的事物
        //currentThing.getChilds().clear();//先清空子节点，好像replace也可以清空子节点
        xmlRootThing.replace(thing);
        //刷新结构树，同时阻止xmlEditor重新设置xml
        actions.doAction("refreshOutline", actionContext, "refreshThing", xmlRootThing,
                "xmlEditorNotReset", true, "stopSaving", true);
        //actions.doAction("selectThing", actionContext, "thing", xmlCurrentThing);
        
        //重新选择xmlEditor中光标位置的事物
        def editThing = actions.doAction("xmlEditorGetSelectThing");
        editThing = world.getThing(editThing.getMetadata().getPath());
        actionContext.g().put("currentThing", editThing);
        actionContext.g().put("xmlCurrentThing", editThing);
        
        actions.doAction("xmlEditorShowThing", actionContext, "thing", editThing, "xmlEditorNotReset", true);
        xmlText.setData("modified", false);
        xmlRootThing.save();
    }catch(Exception e){
        showErr(actionContext,"message", e.getMessage());
        
        return false;
    }    
}else{
    //检测节点是否存在
    def checkedThing = actions.doAction("checkThing", ["thing":currentThing]);
    if(checkedThing == null || checkedThing instanceof String){
        return false;
    }
    checkedThing = checkedThing;
    
    if(currentModel != null){
        if(!currentModel.doAction("validate", currentModelContext)) return;
        
        //保存缓存
        for(key in dataCache.keySet()){
            if(key == currentThing.metadata.path){
                continue;
            }
        
            def keyThing = dataThingCache.get(key);    
            def keyData = dataCache.get(key);
            if(keyThing != null && keyData != null && !keyThing.getMetadata().isRemoved()){
                keyThing.cognize(keyData.data);
            }
        }
        dataCache.clear();
        dataThingCache.clear();
        
        //设置和保存
        def editedData = currentModel.doAction("getValue", currentModelContext);
        currentThing.cognize(editedData);      
    }
    
    currentThing.save();
    actionContext.getScope(0).put("rootLastModified", currentThing.getRoot().getMetadata().getLastModified());
}

//重新读取，更新缓存
thingEntry.getThing()
currentThing = world.getThing(currentThing.metadata.path);
def treeItem = innerOutline.getSelection()[0];
actions.doAction("initOutlineTreeItem", actionContext, ["thing":currentThing, "treeItem":treeItem]);
//treeItem.setData(currentThing);
//treeItem.setText(currentThing.metadata.label + " (" + currentThing.thingName + ")");

actions.doAction("modify", ["setModified":false]);
for(item in innerOutline.items){
    initItemThing(item);
}

//保存备份
ThingBackupUtil.backup(currentThing);

return true;

//重新设置树节点的缓存事物
def initItemThing(item){
    def thing = item.getData();
    if(thing == null){
        item.dispose();        
    }else{
        item.setData(world.getThing(thing.metadata.path));
        for(childItem in item.items){
            initItemThing(childItem);
        }
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    save
      @/@actions/@save/@ActionDefined
      sname
      ActionDefined
      sdescriptors
      xworker.lang.actions.Inout/@ActionDefined
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ActionDefined
        @/@actions/@save/@ActionDefined/@showErr
        sname
        showErr
        sshell
        ognl:mainComposite.getShell()
        sicon
        ICON_ERROR
        sbuttons
        OK
        stitle
        lang:d=解析XML失败&en=Parse XML failed
        smessage
        var:message
        sinterpretationType
        Self
        sattributeTemplate
        false
        schildsAttributeTemplate
        false
        svarScope
        Local
        sisSynchronized
        false
        sthrowException
        true
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdisableGlobalContext
        false
        sdebugLog
        false
        sdescriptors
        xworker.swt.actions.MessageBoxActions/@MessageBox
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        showErr
    @/@actions/@delete
    sname
    delete
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    delete
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

//应该已经被nodeDelete方法代替了
MessageBox box = new MessageBox(innerOutline.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_WARNING);
box.setText("操作信息");
box.setMessage("确定要删除选中的节点吗？");

dataObject = currentDataObject;
if(SWT.OK == box.open()){
    if(dataObject.getParent() != null){
        def treeItem = innerOutline.getSelection()[0];
        def parentTreeItem = treeItem.getParentItem();
        treeItem.dispose();
        //outlineTree.select(parentTreeItem);
        
        if(!dataObject.isTransient()){
            dataObject = dataCenter.getDataObject(dataObject.metadata.path);
            def parent = dataObject.getParent();
            parent.removeChild(dataObject);
            def root = parent.getRootParent();        
            root.metadata.factory.save(root);
        }else{
            def parent = dataObject.getParent();
            parent.removeChild(dataObject);
        }
        //刷新缓存
        thingEntry.getThing();
    }else{
        box = new MessageBox(innerOutline.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_WARNING);
        box.setText("操作信息");
        box.setMessage("确实要删除整个数据对象么？");
        if(SWT.OK == box.open()){
            if(!dataObject.isTransient()){
                dataObject.metadata.factory.remove(dataObject);
            }
            
            shell.dispose();
        }
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    delete
    @/@actions/@moveUp
    sname
    moveUp
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    svarScope
    Global
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.DataObject;
import org.xmeta.ScriptObject;

//应该已经没有用了
return;
def dataObject = currentDataObject;
if(!dataObject.isTransient()){
    dataObject = dataCenter.getDataObject(dataObject.metadata.path);
    if(dataObject == null) return;
}

int index = dataObject.getItemIndex(null);
if(index != -1 && index != 0){        
    def parent = dataObject.getParent();
    parent.removeChild(dataObject);
    parent.addChild(dataObject, index - 1);
    
    if(!dataObject.isTransient()){
        parent.save();
        //刷新缓存，避免以为是外部更新了
        thingEntry.getThing();
    }
    
    //println "xxxxxxxxxxxxxxxxxxx move up";
    ScriptObject initTree = dataCenter.getScriptObject("core.editor.swt.shareScript.DataObjectEditor/@scripts/@initOutline");    
    def treeItem = innerOutline.getSelection()[0];
    def parentTreeItem = treeItem.getParentItem();    
    def newItem = initTree.call(parentTreeItem, dataObject, index - 1);
    innerOutline.setSelection(newItem);
    treeItem.dispose();
}
#$@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
    moveUp
    @/@actions/@moveDown
    sname
    moveDown
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    svarScope
    Global
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.DataObject;
import org.xmeta.ScriptObject;

//应该已经没有用了
return;

def dataObject = currentDataObject;
if(!dataObject.isTransient()){
    dataObject = dataCenter.getDataObject(dataObject.metadata.path);
    if(dataObject == null) return;
}
def treeItem = innerOutline.getSelection()[0];
def parentTreeItem = treeItem.getParentItem();   
int index = dataObject.getItemIndex(null);

if(index != -1 && index < parentTreeItem.getItems().length - 1){        
    def parent = dataObject.getParent();
    parent.removeChild(dataObject);
    parent.addChild(dataObject, index + 1);
    if(!dataObject.isTransient()){
        parent.save();
         //刷新缓存，避免以为是外部更新了
        thingEntry.getThing();
    }
    
    ScriptObject initTree = dataCenter.getScriptObject("core.editor.swt.shareScript.DataObjectEditor/@scripts/@initOutline");    
     
    def newItem = initTree.call(parentTreeItem, dataObject, index + 2);
    innerOutline.setSelection(newItem);
    treeItem.dispose();    
}
#$@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
    moveDown
    @/@actions/@clearCache
    sname
    clearCache
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    clearCache
    sdisableGlobalContext
    false
    Scode
#$@text#$@
if(actionContext.get("dataCache") != null){
    dataCache.remove(thing.metadata.path);
    dataThingCache.remove(thing.metadata.path);
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    clearCache
    @/@actions/@saveEditCache
    sname
    saveEditCache
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    saveEditCache
    sdisableGlobalContext
    false
    sdescription
    <p>保存当前编辑事物节点的数据缓存。</p>
    Scode
#$@text#$@
//保存当前事物的编辑缓存
if(actionContext.get("dataCache") == null){
    dataCache = [:];    
    dataThingCache = [:];
    actionContext.getScope(0).put("dataCache", dataCache);
    actionContext.getScope(0).put("dataThingCache", dataThingCache);
}

if(actions.doAction("isXmlEditor")){
    //xml没有cache缓存
    return;
}

if(actionContext.get("currentModel") != null && actionContext.get("modified") == true){
    def data = currentModel.doAction("getValue", currentModelContext);
    def cache = dataCache.get(currentThing.metadata.path);
    if(cache == null){
        cache = ["data":data, "time":currentThing.metadata.lastModified];
    }else{
        cache.data.putAll(data);
    }
    
    dataCache.put(currentThing.metadata.path, cache);
    dataThingCache.put(currentThing.metadata.path, currentThing);
    
    /*
    //已经在Tb显示已修改的状态，故取消此代码
    if(actionContext.get("currentItem") != null && !currentItem.isDisposed()){
        currentItem.setData("modified", true);
        actions.doAction("displayItemText", ["treeItem":currentItem]);
    }*/
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    saveEditCache
    @/@actions/@displayItemText
    sname
    displayItemText
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    displayItemText
    sdisableGlobalContext
    false
    Sdescription
#$@text#$@
<p>显示概要树的指定节点的文本。</p>
<p>参数:treeItem。</p>
#$@text#$@
    Scode
#$@text#$@
import org.eclipse.swt.widgets.TreeItem;

if(actionContext.get("treeItem") != null && treeItem instanceof TreeItem){
    def thing = treeItem.getData();
    def text = thing.metadata.label + "(" + thing.getDescriptors()[0].metadata.name + ")";
    if(treeItem.getData("modified") != true){
        text = text + "*";
    }
    
    treeItem.setText(text);
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    displayItemText
    @/@actions/@modify
    sname
    modify
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    modify
    sdisableGlobalContext
    false
    sdescription
    <p>向编辑界面控件传递的ModifierListener的实际调用函数。</p>
    Scode
#$@text#$@
if(actionContext.get("setModified") == false){
    if(actionContext.get("modified") == true){
        if(actionContext.get("contentTab") != null){
            contentTab.setText(contentTab.getText().substring(1, contentTab.getText().length()));
        }
    }
    
    actionContext.put("modified", false);    
    //eclipse插件的thingEditor变量
    if(actionContext.get("thingEditor") != null){
        thingEditor.setDirty(false);
    }
    
    //作为事物编辑器时的事件触发
    if(actionContext.get("editorThing") != null && actionContext.get("editorThingContext") != null){
        editorThing.doAction("modify", editorThingContext, "modified", false); 
    }            
}else if(actionContext.get("modified") != true){
    actionContext.put("modified", true);
    
    if(actionContext.get("contentTab") != null){
        contentTab.setText("*" + contentTab.getText());
    }

    //eclipse插件的thingEditor变量
    if(actionContext.get("thingEditor") != null){
        thingEditor.setDirty(true);
    }

    //作为事物编辑器时的事件触发
    if(actionContext.get("editorThing") != null && actionContext.get("editorThingContext") != null){
        editorThing.doAction("modify", editorThingContext, "modified", true); 
    }
}

//设置标题
if(actionContext.get("titleLabel") != null){    
    int index = descriptorsCombo.getSelectionIndex();
    if(index == -1){
        return;
    }
    def objStruct = descriptorsCombo.getData().get(index);
    def thing = currentThing;
    if(actionContext.get("modified") == true){
        titleLabel.setText("*** " + thing.metadata.label + "－" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）***");
    }else{
        titleLabel.setText(thing.metadata.label + "－" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    modify
    @/@actions/@refreshOutline
    sname
    refreshOutline
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    refreshOutline
    sdisableGlobalContext
    false
    sdescription
    <p>&nbsp;参数：refreshThing，如果存在那么刷新thing指定的节点，否则刷新当前选中的树节点。</p>
    Scode
#$@text#$@
//强制刷新事物的时间，避免稍候被判断是外部改动重新刷新
thingEntry.getThing();

if(actionContext.get("refreshThing") != null){
    actions.doAction("selectThing", ["thing":refreshThing, "refrsh":false]);    
}

refreshMenuSelection.handleEvent(null);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    refreshOutline
      @/@actions/@refreshOutline/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@refreshOutline/@ins/@refreshThing
        sname
        refreshThing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        refreshThing
        @/@actions/@refreshOutline/@ins/@just_refresh_outline
        sname
        disableOpenThingAfterRefresh
        stype
        java.lang.Boolean
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        Sdescription
#$@text#$@
<p>默认为null，如果为true，那么只刷新outline树节点。</p>
#$@text#$@
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        snotXmlAttribute
        false
        sjson_isArray
        false
        sgroupDescriptor
        false
        sai_needGenerate
        false
        sai_generateType
        create
        sai_promptContainsVars
        false
        sid
        just_refresh_outline
    @/@actions/@setMenuVisiable
    sname
    setMenuVisiable
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setMenuVisiable
    sdisableGlobalContext
    false
    Scode
#$@text#$@
if(visiable){
    titleTitleCompositeGridData.horizontalSpan = 0;
    menuBarCompositeGridData.horizontalSpan = 0;
    spliteLabel1GridData.horizontalSpan = 0;
}else{
    titleTitleCompositeGridData.horizontalSpan = 1;
    menuBarCompositeGridData.horizontalSpan = 1;
    spliteLabel1GridData.horizontalSpan = 1;
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setMenuVisiable
    @/@actions/@getCurrentValue
    sname
    getCurrentAttribute
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    getCurrentAttribute
    sdisableGlobalContext
    false
    sdescription
    <p>获取属性值，如果正在编辑获取编辑器中的值，负责获取还未保存的缓存中的值，最后获取事物本身的属性值。</p>
    Scode
#$@text#$@
//先获取编辑器的

if(currentThing == thing){
    def editedData = currentModel.doAction("getValue", currentModelContext);
    if(editedData.containsKey(name)){
        return editedData.get(name);
    }
}

//其次获取编辑未保存的
if(actionContext.get("dataCache") != null){
    def cache = dataCache.get(thing.metadata.path);
    if(cache != null){
        //log.info("i1cache=" + cache);
        if(cache.data.containsKey(name)){
            return cache.data.get(name);
        }        
    }    
}

//最后获取事物本身的
return thing.get(name);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getCurrentValue
      @/@actions/@getCurrentValue/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@getCurrentValue/@ins/@name
        sname
        name
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        name
        @/@actions/@getCurrentValue/@ins/@thing
        sname
        thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
    @/@actions/@initOutlineTreeItem
    sname
    initOutlineTreeItem
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initOutlineTreeItem
    sdisableGlobalContext
    false
    sdescription
    <p>初始化节点的文字、字体和颜色等。</p>
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import xworker.swt.util.ResourceManager;
import xworker.swt.util.XWorkerTreeUtil;

//设置内部的outline
if(thing == null){
    return;
}

XWorkerTreeUtil.initItem(treeItem, thing, actionContext);
//initItemColor(treeItem, thing);
treeItem.setText(thing.metadata.label);// + "      (" + thing.thingName + ")");
treeItem.setData(thing);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initOutlineTreeItem
      @/@actions/@initOutlineTreeItem/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@initOutlineTreeItem/@ins/@treeItem
        sname
        treeItem
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        treeItem
        @/@actions/@initOutlineTreeItem/@ins/@thing
        sname
        thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
    @/@actions/@initQuickEditoTable
    sname
    initQuickEditTable
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initQuickEditTable
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableItem;

//先清除表格
for(item in quickTable.getItems()){
    item.dispose();
}

//按钮失效
quickEditbutton.setEnabled(false);
parentCategoryButton.setEnabled(false);
childCategoryButton.setEnabled(false);

//表格数据
int selection = 0;
def selectThing = null;
def parent = currentThing.getParent();
if(parent == null){
    def item = new TableItem(quickTable, SWT.NONE);
    item.setText([currentThing.getMetadata().getName(), currentThing.getMetadata().getLabel(), currentThing.getThingName()] as String[]);
    item.setData(currentThing);
    selectThing = currentThing;
}else{
    int index = 0;
    for(child in parent.getChilds()){
        def item = new TableItem(quickTable, SWT.NONE);
        item.setText([child.getMetadata().getName(), child.getMetadata().getLabel(), child.getThingName()] as String[]);
        item.setData(child);
        
        if(child == currentThing){
            selection = index;
            selectThing = child;
        }
        
        index++;
    }
}

if(quickTable.getItems().length > 0){
    quickTable.setSelection(selection);
    quickEditbutton.setEnabled(true);
    if(parent != null){
        parentCategoryButton.setEnabled(true);    
    }
    if(selectThing != null && selectThing.getChilds().size() > 0){
        childCategoryButton.setEnabled(true);
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initQuickEditoTable
    @/@actions/@innerOutlineExpand
    sname
    innerOutlineExpand
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    innerOutlineExpand
    sdisableGlobalContext
    false
    Scode
#$@text#$@
if(actionContext.get("innerOutlineExpandCache") != null){
    innerOutlineExpandCache.put(event.item.getData().getMetadata().getPath(), event.item.getData());
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    innerOutlineExpand
    @/@actions/@innerOutlineCollapse
    sname
    innerOutlineCollapse
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    innerOutlineCollapse
    sdisableGlobalContext
    false
    scode
    innerOutlineExpandCache.remove(event.item.getData().getMetadata().getPath());
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    innerOutlineCollapse
    @/@actions/@initOutlineBrowser
    sname
    initOutlineBrowser
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initOutlineBrowser
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableItem;
import xworker.swt.util.SwtUtils;

//println("actions:initOutlineBrowser");
//初始化outlineBrowser和相关内容
if(actionContext.get("outlineBrowser") == null || outlineBrowser.isDisposed()){
    return;
}

//标题的提示和帮助

//def webUrl = XWorkerUtils.getThingDescUrl(descriptor);
if(actionContext.get("outlineBrowser") != null &&  !outlineBrowser.isDisposed()){
    SwtUtils.setThingDesc(descriptor, outlineBrowser);
    //outlineBrowser.setUrl(webUrl);
}

//属性列表
actions.doAction("initOutlineAttributes", actionContext, ["thing": thing]);

//类和描述者
def dess = [:];
descriptorsTable.setDatas([]);
for(descriptor in thing.getAllDescriptors()){
    if(dess.get(descriptor.metadata.path) != null){
        continue;
    }
    dess.put(descriptor.metadata.path, descriptor);
    
    descriptorsTable.updateRow(null, ["name": descriptor.metadata.name, "path":descriptor.metadata.path]);    
}

//继承
def exss = [:];
extendsTable.setDatas([]);
for(exend in thing.getAllExtends()){
    if(exss.get(exend.metadata.path) != null){
        continue;
    }
    exss.put(exend.metadata.path, exend);

    extendsTable.updateRow(null, ["name": exend.metadata.name, "path":exend.metadata.path]);    
}

//行为
actions.doAction("initOutlineThingActions", actionContext, ["thing": thing]);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initOutlineBrowser
      @/@actions/@initOutlineBrowser/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@initOutlineBrowser/@ins/@descriptor
        sname
        descriptor
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        descriptor
        @/@actions/@initOutlineBrowser/@ins/@thing
        sname
        thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
    @/@actions/@initOutlineThingActions
    sname
    initOutlineThingActions
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initOutlineThingActions
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableItem;

//动作文档
def actionThings = thing.getActionsThings();
actionsTable.removeAll();
def acs = [];
def acss = [:];
def acds = [:];
for(ac in actionThings){
    acs.add(ac.metadata.name);
    acss.put(ac.metadata.name, ac.metadata.path);
    if(ac.parent.parent != null){
        def acDescriptor = ac.parent.parent.getMetadata().getLabel();
        acds.put(ac.metadata.name, acDescriptor);
        acds.put("type_" + ac.metadata.name, ac.getDescriptor().getMetadata().getLabel());
    }
}
Collections.sort(acs);

for(ac in acs){
    def titem = new TableItem(actionsTable, SWT.NONE);
    titem.setText([ac, acds.get("type_" + ac), acds.get(ac)] as String[]);
    titem.setData(["path":acss.get(ac)]);
    titem.setData("name", ac);
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initOutlineThingActions
    @/@actions/@initOutlineAttributes
    sname
    initOutlineAttributes
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initOutlineAttributes
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableItem;

//动作文档
//if(thing.getThingName() == "Shell"){
//    actionContext.printStackTrace();
//}
def actionThings = thing.getAllAttributesDescriptors();
attributesTable.removeAll();
def acs = [];
def acss = [:];
def acds = [:];
for(ac in actionThings){
    def name = ac.metadata.name;
    def label = ac.metadata.label;
    if(label != name){
        label = name + "(" + label + ")";
    }
    acs.add(name);
    acss.put(name, ac.metadata.path);
    def acDescriptor = ac.getParent().getMetadata().getLabel();
    acds.put(name, acDescriptor);
    //值
    def value = thing.getStringBlankAsNull(name);
    if(value == null){
        value = "";
    }
    acds.put("type_" + name, value);
    
    acds.put("label_" + name, label);
}
Collections.sort(acs);

//按描述者分组
def dess = [];
def desc = [:];
for(descrptor in thing.getDescriptors()){
    def name =  descrptor.getMetadata().getName();
    dess.add(name);
    desc.put(name, name);
}
for(ac in acs){
    def name = acds.get(ac);
    if(desc.get(name) != null){
        continue;
    }
    
    dess.add(name);
    desc.put(name,name);
}

//for(des in dess){
    for(ac in acs){
 //       if(acds.get(ac) == des){
            def titem = new TableItem(attributesTable, SWT.NONE);
            titem.setText([ac, acds.get("type_" + ac), acds.get(ac)] as String[]);
            titem.setData(["path":acss.get(ac)]);
            titem.setData("name", ac);
//        }
  //  }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initOutlineAttributes
    @/@actions/@initToobarMenu
    sname
    initToobarMenu
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    initToobarMenu
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.World;
import org.xmeta.Thing;

import org.xmeta.util.UtilData;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import xworker.swt.listeners.SwtMenuListener;
import xworker.swt.util.SwtUtils;
import xworker.swt.events.SwtListener;

import java.util.HashMap;

import org.xmeta.util.UtilString;
import xworker.swt.ide.assistor.Assistor;
import xworker.lang.util.XWorkerUtils;

//初始化描述者
if(menuBarComposite != null && !menuBarComposite.isDisposed()){
    descriptorsCombo.removeAll();
    structCombo.removeAll();
    def structures = thing.getDescriptors();
    def childComboDatas = [];
    for(str in structures){
        childComboDatas.add(str);
    }
    descriptorsCombo.setData(structures);
    structCombo.setData(childComboDatas);
    for(struct in structures){
        descriptorsCombo.add(struct.metadata.label);
    }
    for(struct in childComboDatas){
        structCombo.add(struct.metadata.label);
    }
    childComboDatas.add(world.getThing("xworker.core.util.ThingTemplate"));
    //初始化继承
    def exts = thing.getExtends();
    extendsCombo.setData(exts);
    extendsCombo.removeAll();
    for(ext in exts){
        extendsCombo.add(ext.metadata.label);
    }
    
    //初始化方法列表
    methodsCombo.removeAll();
    def scriptObjects = thing.getActionsThings();
    def actionList = [];
    for(sobj in scriptObjects){        
        actionList.add(sobj.metadata.name);
    }
    Collections.sort(actionList);
    for(action in actionList){
        methodsCombo.add(action);
    }
    methodsCombo.setData(scriptObjects);
    
    //选择默认的节点
    descriptorsCombo.select(0);
    structCombo.select(0);
}

//初始化菜单
//取当前选择的描述
int index = descriptorsCombo.getSelectionIndex();
def objStruct = descriptorsCombo.getData().get(index);
structureThing = objStruct;

//标题的提示和帮助
def webUrl = XWorkerUtils.getThingDescUrl(objStruct);
/*

if(actionContext.get("outlineBrowser") != null &&  !outlineBrowser.isDisposed()){
    outlineBrowser.setUrl(webUrl);
}
actions.doAction("initOutlineBrowser", actionContext, ["descriptor": objStruct, "thing": currentThing]);
*/

if(titleComposite != null && !titleComposite.isDisposed()){
    titleLabel.setText(UtilString.getString("res:res.w_exp:editLabel:编辑：", actionContext) + thing.metadata.label + "－" + objStruct.metadata.name + "（" + objStruct.metadata.label + "）");
    
    String toolTipText = "<b><u><a href=\"" + webUrl + 
        "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + objStruct.getMetadata().getPath() + "\">" +
        objStruct.getMetadata().getName() + "</a></u></b><br/><br/>";    			    
        
    //log.info(    toolTipText);
    if(objStruct.metadata.description != null){
        String ttText = objStruct.metadata.description;
        titleLabel.setData("toolTip", toolTipText + ttText);
    }else{
        titleLabel.setData("toolTip", toolTipText);
    }
}

if(menuBarComposite != null && !menuBarComposite.isDisposed()){
    //初始化菜单
    def menus = [];
    SwtMenuListener swtMenu = SwtMenuListener.getInstance();
    if(objStruct != null){
        String[] paths = thing.getDescriptors()[0].metadata.getPaths();
        menus = swtMenu.getMenu(thing, paths, "data");
    }else{        	
        String strFullPath = (structurePath == null || "".equals(structurePath.trim())) ? descriptors : (descriptors + ":" + structurePath);
        menus = swtMenu.getMenu(thing, [strFullPath], "data");
    }
    
    def toolItemListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@toolBarItemSelection");
    def disposeListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@dispose");
    def menuListenerObject = world.getThing("xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@menuSelection");
    
    for(item in toolBar.getItems()){
        item.dispose();
    }
    
    for(menu in menus){
        ToolItem item = new ToolItem(toolBar, SWT.PUSH);
        //println item;
        item.setText(menu.metadata.label);
        item.addListener(SWT.Selection, new SwtListener(toolItemListenerObject, actionContext));
        item.addListener(SWT.Dispose, new SwtListener(disposeListenerObject, actionContext));
        
        String attachUrl = "&thingName=" + thing.metadata.path + "&descriptors=";
        //创建菜单
        Menu amenu = new Menu(toolBar.getShell(), SWT.POP_UP);
        //item.setMenu(amenu);
        for(child in menu.getChilds()){
            initMenuItem(amenu, child, attachUrl, menuListenerObject, actionContext);
        }    
        item.setData("menu", amenu);
    }
}


//是否显示菜单工具栏
//if(structureThing.get)
def initMenuItem(parent, menuData, attachUrl, menuListenerObject, swtActionContext){
    int style = SWT.PUSH;
    if(menuData.childs.size() > 0){
        style = SWT.CASCADE;
    }else if(menuData.getBoolean("isSplit")){
        style = SWT.SEPARATOR;
    }
        
    MenuItem mitem = new MenuItem(parent, style);
    mitem.setData("menu", menuData);
    if(menuData.accelerator != null && menuData.accelerator != ""){
        mitem.setText(menuData.metadata.label + "\t" + menuData.accelerator);        
        mitem.setAccelerator(SwtUtil.getAccelerator(menuData.accelerator));
    }else{
        mitem.setText(menuData.metadata.label);
    }
    mitem.addListener(SWT.Selection, new SwtListener(menuListenerObject, swtActionContext));
    
    String url = menuData.getString("url");
    if(url != null && url != ""){
        //if(menuData.getBoolean("attachParam")){
        //    mitem.setData("url", menuData.getString("url") + attachUrl);
        //}else{
        mitem.setData("url", menuData.getString("url"));
        //}
    }else{
        def menuActions = menuData.get("actions@0");
        if(menuActions != null && menuActions.childs.size() > 0){
            mitem.setData("url", menuActions.childs[0].metadata.path);
        }
    }
    
    def childMenus = menuData.get("Menu@");
    if(childMenus.size() > 0){
        Menu subMenu = new Menu(mitem); 
        mitem.setMenu(subMenu);   
        for(child in childMenus){                     
            initMenuItem(subMenu, child, attachUrl, menuListenerObject, swtActionContext);        
        }
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    initToobarMenu
    @/@actions/@addChild
    sname
    showAddChild
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showAddChild
    sdisableGlobalContext
    false
    Scode
#$@text#$@
if(actionContext.get("doInitChildTree") == false){
    //如果子节点树没有初始化，那么初始化
    actionContext.getScope(0).put("doInitChildTree", true);
    descriptsComboSelection.handleEvent(null);
}

editPartCompositeStackLayout.topControl = addChildSashForm;
editPartComposite.layout();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    addChild
    @/@actions/@setAddChildDescriptor
    sname
    setAddChildDescriptor
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setAddChildDescriptor
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.ActionContext;

import xworker.swt.events.SwtListener;
import xworker.swt.listeners.SwtMenuListener;
import org.xmeta.util.UtilString;

import org.eclipse.swt.SWT;

import xworker.swt.form.ThingDescriptorForm;


//先清空原有的添加面板
for(child in childContentComposite.getChildren()){
    child.dispose();
}

newThingDescriptor = descriptor;

def globalConfig = world.getThing("_local.xworker.config.GlobalConfig");
def webUrl = globalConfig.getString("webUrl");
webUrl = webUrl + "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + objStruct.getMetadata().getPath();
childDescBrowser.setUrl(webUrl);

//初始化编辑内容窗体
Thing structForm = new Thing();
structForm.set("descriptors", "xworker.swt.xworker.ThingDescritporForm");
structForm.name = "contentForm";
structForm.descriptorPath = objStruct.metadata.path;
structForm.H_SCROLL = "true";
structForm.V_SCROLL = "true";

def thing = new Thing("", "", objStruct.metadata.path, false);
ActionContext context = new ActionContext();
//context.put("parent", addChildComposite);
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildSelectionListener);
context.put("explorerActions", actionContext.get("explorerActions"));
context.put("explorerContext", actionContext.get("explorerContext"));
context.put("utilBrowser", actionContext.get("utilBrowser"));

def structFormObj = ThingDescriptorForm.createThingSingleColumnForm(thing, objStruct, "addChildOkButtonSelection", null, childContentComposite, context);
//def structFormObj = structForm.doAction("create", context);
context = structFormObj.getData();
context.put("thing", thing);
context.put("addChildOkButtonSelection", addChildSelectionListener);
context.model.defaultSelection = "addChildOkButtonSelection";
//context.model.doAction("init", context);
context.model.doAction("setValue", context);

currentAddModel = context.model;
currentAddModelContext =  context;

addChildButton.setEnabled(true);

/*
addChildComposite.layout();

if(contentEditCompositeStackLayout.topControl != childComposite){
    contentEditComposite.setData("oldTopControl", contentEditCompositeStackLayout.topControl);
    contentEditCompositeStackLayout.topControl = childComposite;
    contentEditComposite.layout();
}
*/

if(actionContext.get("helpBrowserAction") != null){
    helpBrowserAction.doAction("setThing", ["thing":newThingDescriptor]);
}
//log.info("helpBrowserAction=" + helpBrowserAction);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setAddChildDescriptor
      @/@actions/@setAddChildDescriptor/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@setAddChildDescriptor/@ins/@descriptor
        sname
        descriptor
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        descriptor
    @/@actions/@setAddChildValues
    sname
    setAddChildValues
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setAddChildValues
    sdisableGlobalContext
    false
    Scode
#$@text#$@
def currentAddModel = addChildButton.getData("currentAddModel");
def currentAddModelContext = addChildButton.getData("currentAddModelContext");

def ovalues = currentAddModel.doAction("getValue", actionContext);
ovalues.putAll(values);

currentAddModel.doAction("setValue", currentAddModelContext, ["thingAttributes": ovalues]);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setAddChildValues
      @/@actions/@setAddChildValues/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@setAddChildValues/@ins/@values
        sname
        values
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        values
    @/@actions/@doAddChild
    sname
    doAddChild
    srefActionPath
    xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@rightComposite/@contentComposite/@mainSashForm/@editPartComposite/@addChildSashForm/@childComposite/@childContentButtonComposite/@addChildButton/@Listeners/@addChildSelectionListener/@addChildSelection
    skeepSelf
    true
    sinterpretationType
    Action
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@RefAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    doAddChild
    @/@actions/@getAttributeInput
    sname
    getAttributeInput
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    getAttributeInput
    sdisableGlobalContext
    false
    scode
    return currentModelContext.get(name + "Input");
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getAttributeInput
      @/@actions/@getAttributeInput/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@getAttributeInput/@ins/@name
        sname
        name
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        name
    @/@actions/@focusAttributeInput
    sname
    focusAttributeInput
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    focusAttributeInput
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.widgets.Control;

log.info("name=" + name + "Input");
def c = actions.doAction("getAttributeInput");
log.info("forcus c=" + c);
if(c instanceof Control){
    c.setFocus();
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    focusAttributeInput
      @/@actions/@focusAttributeInput/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@focusAttributeInput/@ins/@name
        sname
        name
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        name
    @/@actions/@setValues
    sname
    setValues
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setValues
    sdisableGlobalContext
    false
    Scode
#$@text#$@
def ovalues = currentModel.doAction("getValue", currentModelContext);
ovalues.putAll(values);
currentModel.doAction("setValue", currentModelContext, ["thingAttributes": ovalues]);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setValues
      @/@actions/@setValues/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@setValues/@ins/@values
        sname
        values
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        values
    @/@actions/@showEditor
    sname
    showEditor
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showEditor
    sdisableGlobalContext
    false
    sdescription
    <p>显示编辑器界面，通常是从添加子节点界面切换过来。</p>
    Scode
#$@text#$@
editPartCompositeStackLayout.topControl = contentEditComposite;
editPartComposite.layout();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    showEditor
    @/@actions/@selectChildTreeNode
    sname
    selectChildTreeNode
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    selectChildTreeNode
    sdisableGlobalContext
    false
    sdescription
    <p>选择添加子节点上的一个记录。</p>
    Scode
#$@text#$@
for(item in childTree.getItems()){
    getItem(childTree, item, thingPath);
}

def getItem(tree, item, thingPath){
    if(item.getData() != null && item.getData().getMetadata().getPath() == thingPath){
        tree.setSelection(item);
        childTreeSelection.handleEvent(null);
        return;
    }else{
        for(childItem in item.getItems()){
            getItem(tree, childItem, thingPath);
        }
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    selectChildTreeNode
      @/@actions/@selectChildTreeNode/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@selectChildTreeNode/@ins/@thingPath
        sname
        thingPath
        stype
        String
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thingPath
    @/@actions/@isXmlEditor
    sname
    isXmlEditor
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    isXmlEditor
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//返回当前是否是XML编辑器
return editPartCompositeStackLayout.topControl == xmlComposite;
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    isXmlEditor
    @/@actions/@nodeMoveUp
    sname
    nodeMoveUp
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    nodeMoveUp
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import xworker.swt.util.XWorkerTreeUtil;

def parent = currentThing.getParent();
if(parent != null){
    parent.changeChildIndex(currentThing, -1, -1);
    parent.save();
    
    //刷新缓存
    thingEntry.getThing();
    
    def treeItem = innerOutline.getSelection()[0];
    def parentTreeItem = treeItem.getParentItem();  
    int index = parentTreeItem.indexOf(treeItem);
    if(index > 0){
        index --;        
        def item = new TreeItem(parentTreeItem, SWT.NONE, index);
        item.setData(currentThing);
        item.setText(currentThing.metadata.label+ " (" + currentThing.thingName + ")");
        XWorkerTreeUtil.initItem(item, currentThing, actionContext);
        
        for(child in currentThing.childs){
            init(item, child);
        }
    
        //item.setExpanded(true);
        innerOutline.setSelection(item);
        
        treeItem.dispose();
    }
}

def init(treeItem, dataObj){
    TreeItem childItem = new TreeItem(treeItem, SWT.NONE);
    childItem.setData(dataObj);
    childItem.setText(dataObj.metadata.label + " (" + dataObj.thingName + ")");
    //childItem.setImage(Resources.getImage("dataObject.png"));
    XWorkerTreeUtil.initItem(childItem, dataObj, actionContext);
    
    for(child in dataObj.childs){
        init(childItem, child);
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    nodeMoveUp
    @/@actions/@nodeMoveDown
    sname
    nodeMoveDown
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    nodeMoveDown
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import xworker.swt.util.XWorkerTreeUtil;

def parent = currentThing.getParent();

if(parent != null){
    parent.changeChildIndex(currentThing, -1, 1);
    parent.save();
    //刷新缓存
    thingEntry.getThing();
    
    def treeItem = innerOutline.getSelection()[0];
    def parentTreeItem = treeItem.getParentItem();  
    int index = parentTreeItem.indexOf(treeItem);
    if(index < parentTreeItem.items.length - 1){
        index = index + 2;         
        def item = new TreeItem(parentTreeItem, SWT.NONE, index);
        item.setData(currentThing);
        item.setText(currentThing.metadata.label+ " (" + currentThing.thingName + ")");
        XWorkerTreeUtil.initItem(item, currentThing, actionContext);
        
        for(child in currentThing.childs){
            init(item, child);
        }
        
        //item.setExpanded(true);
        innerOutline.setSelection(item);
        
        treeItem.dispose();
    }
}

def init(treeItem, dataObj){
    TreeItem childItem = new TreeItem(treeItem, SWT.NONE);
    childItem.setData(dataObj);
    childItem.setText(dataObj.metadata.label + " (" + dataObj.thingName + ")");
    XWorkerTreeUtil.initItem(childItem, dataObj, actionContext);
    //childItem.setImage(Resources.getImage("dataObject.png"));
    
    for(child in dataObj.childs){
        init(childItem, child);
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    nodeMoveDown
    @/@actions/@editorTypeChange
    sname
    editorChangeType
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    editorChangeType
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.codes.XmlCoder;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

import org.xmeta.util.UtilString;
import xworker.swt.ide.assistor.Assistor;

//改变编辑器的编辑方法，在表单和XML编辑器之间切换
if(editPartCompositeStackLayout.topControl == xmlComposite){
    //检查是否已修改
    if(actionContext.get("modified") == true){
        if(actions.doAction("save", actionContext) == false){
            //保存失败
            return;
        }
        /*
        MessageBox box = new MessageBox(innerOutline.getShell(), SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_WARNING);
        box.setText("切换编辑方式");
        box.setMessage("XML已修改，请先保存，否则将丢弃XML的修改结果。");
        def r = box.open();
        if(r == SWT.YES){
            actions.doAction("save", actionContext);
        }else if(r == SWT.CANCEL){
            return;
        }*/
    }
    //切换到表单模式
    editPartCompositeStackLayout.topControl = contentEditComposite;    

    if(actionContext.get("dataCache") != null){
        dataCache.clear();
        dataThingCache.clear();
    }

     //命令
    def editorCommandDomain = world.getThing("xworker.swt.ide.worldexplorer.swt.command.ThingEditorCommandDomain");
    Assistor.setCommandDomain(editorCommandDomain, actionContext);
    
    //设置编辑器的表单
    actions.doAction("openThing", actionContext);
}else{
    //切换到XML的编辑模式
    //先保存
    if(actionContext.get("modified") == true){
        if(actions.doAction("save", actionContext) == false){
            //保存失败
            return;
        }
    }
    
    //设置xml编辑器的内容
    actions.doAction("xmlSetCurrentThing", actionContext);
    
    //命令
    def editorCommandDomain = world.getThing("xworker.swt.ide.worldexplorer.swt.command.XmlEditorCommandDomain");
    Assistor.setCommandDomain(editorCommandDomain, actionContext);
    
    
    editPartCompositeStackLayout.topControl = xmlComposite;
}
editPartComposite.layout();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    editorTypeChange
    @/@actions/@xmlSetCurrentThing
    sname
    xmlSetCurrentThing
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    xmlSetCurrentThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.codes.XmlCoder;

//不重新设置，在save时阻止
if(actionContext.get("xmlEditorNotReset") == true){
    return;
}

//把当前事物转化为XML
actionContext.g().put("xmlCurrentThing", currentThing);
actionContext.g().put("xmlRootThing", currentThing);

def xml = XmlCoder.encodeToString(currentThing);
xmlText.setData("setModified", false);
xmlText.setData("modified", false);
try{
    setText(xmlText, "");
    setText(xmlText, xml);
}catch(Exception e){
}

//初始化Toolbar和菜单
actions.doAction("initOutlineBrowser", actionContext, "descriptor", currentThing.getDescriptor(), "thing", currentThing);
actions.doAction("initToobarMenu", actionContext,"thing", currentThing);
//设置属性编辑
if(actionContext.get("xmlEditorNodeEditorActionContext") != null && xmlEditorNodeEditorActionContext.shell.isDisposed() == false){
    xmlEditorNodeEditorActionContext.actions.doAction("setThing", xmlEditorNodeEditorActionContext, "thing", thing);
}
def setText(xmlText, xml){
    //防止激发修改事件，setModified只能生效一次
    xmlText.setData("setModified", false);
    xmlText.setText(xml);
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    xmlSetCurrentThing
    @/@actions/@xmlEditorRefreshXml
    sname
    xmlEditorSetXmlThing
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    xmlEditorSetXmlThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.codes.XmlCoder;
   
//设置xml并重新定位光标到原来的位置
def xml = XmlCoder.encodeToString(thing);
def offset = xmlText.getCaretOffset();
def topIndex = xmlText.getTopIndex();
xmlText.setText(xml);
try{
    xmlText.setCaretOffset(offset);
}catch(Exception e){
}
xmlText.setTopIndex(topIndex);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    xmlEditorRefreshXml
      @/@actions/@xmlEditorRefreshXml/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@xmlEditorRefreshXml/@ins/@thing
        sname
        thing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
    @/@actions/@xmlEditorGetSelectThing
    sname
    xmlEditorGetSelectThing
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    xmlEditorGetSelectThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.codes.XmlCoder;

import xworker.swt.ide.xmleditor.ThingXmlEditorActions;
import xworker.swt.util.SwtDialog;

if(actionContext.get("xmlRootThing") == null){
    return;
}

//返回xml编辑器中当前选择处的事物
def doc = ThingXmlEditorActions.getThingXmlDocument(xmlText, actionContext);
doc.parse(xmlText.getText(), xmlRootThing.getMetadata().getPath());
def loc = ThingXmlEditorActions.getXmlThingLocation(xmlText, doc);
if(loc != null){
    return loc.getThing();
}else{
    return null;
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    xmlEditorGetSelectThing
    @/@actions/@xmlEditorShowThing
    sname
    xmlEditorShowThing
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    xmlEditorShowThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import xworker.swt.ide.xmleditor.ThingXmlEditorActions;

//未知原因可能会出现递归
if(actionContext.get("xmlEditorShowThing")){
    return;
}

//不重新设置，在save时阻止
if(actionContext.get("xmlEditorNotReset") == true){
}else{
    ThingXmlEditorActions.showSelection(xmlText, thing, actionContext);
}    

actions.doAction("initOutlineBrowser", actionContext, "descriptor", thing.getDescriptor(), "thing", thing);
actions.doAction("initToobarMenu", actionContext,"thing", thing);
actions.doAction("selectThing", actionContext, "thing", thing, "xmlEditorShowThing", true);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    xmlEditorShowThing
      @/@actions/@xmlEditorShowThing/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@xmlEditorShowThing/@ins/@thing
        sname
        thing
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
    @/@actions/@xmlEditorShowAddChildDialog
    sname
    xmlEditorAddChildSetParent
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    xmlEditorAddChildSetParent
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//XML添加子节点的对话框
def xmlAddChildActionContext = actionContext.get("xmlAddChildActionContext");
if(xmlAddChildActionContext != null && xmlAddChildActionContext.shell.isDisposed() == false){
    //设置父事物
    if(actionContext.get("parentThing") != null){
        xmlAddChildActionContext.actions.doAction("setThing", xmlAddChildActionContext, "thing", parentThing);
    }
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    xmlEditorShowAddChildDialog
    @/@actions/@getCurrentThing
    sname
    getCurrentThing
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    getCurrentThing
    sdisableGlobalContext
    false
    Scode
#$@text#$@
if(actions.doAction("isXmlEditor")){
    //xmlCurrentThing是完善xml编辑器后的变量
    return xmlCurrentThing;
}else{
    //currentThing是老的编辑(纯表单）时的变量
    return currentThing;
}
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getCurrentThing
    @/@actions/@editorMainTabFocused
    sname
    editorMainTabFocused
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    editorMainTabFocused
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//在XWorker的事物管理器中，编辑区的tab选中的事物编辑器

        
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    editorMainTabFocused
    @/@actions/@editorMainTabFocusouted
    sname
    editorMainTabFocusouted
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    editorMainTabFocusouted
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//在XWorker的事物管理器中，编辑区的tab选中的了其它的事物编辑器
def xmlAddChildActionContext = actionContext.get("xmlAddChildActionContext");
if(xmlAddChildActionContext != null && xmlAddChildActionContext.shell.isDisposed() == false){
    xmlAddChildActionContext.shell.dispose();
}
if(actionContext.get("xmlEditorNodeEditorActionContext") != null && xmlEditorNodeEditorActionContext.shell.isDisposed() == false){
    xmlEditorNodeEditorActionContext.actions.doAction("save");
    xmlEditorNodeEditorActionContext.shell.dispose();
}
        
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    editorMainTabFocusouted
    @/@actions/@setCacheData
    sname
    setCacheData
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    setCacheData
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//保存事物节点的属性缓存
def cache = dataCache.get(thing.metadata.path);
if(cache == null){
    cache = ["data":attributes, "time": thing.metadata.lastModified];
}else{
    cache.data.putAll(data);
}

dataCache.put(thing.metadata.path, cache);
dataThingCache.put(thing.metadata.path, thing);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    setCacheData
      @/@actions/@setCacheData/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      ins
        @/@actions/@setCacheData/@ins/@thing
        sname
        thing
        stype
        Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        thing
        @/@actions/@setCacheData/@ins/@attributes
        sname
        attributes
        stype
        Map<String, Object>
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        attributes
    @/@actions/@refreshRoot
    sname
    refreshRoot
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    refreshRoot
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//选择根节点
innerOutline.select(innerOutline.getItems()[0]);

refreshMenuSelection.handleEvent(null);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    refreshRoot
    @/@actions/@showXmlEditor
    sname
    showXmlEditor
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showXmlEditor
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//显示XML编辑器
editModelItemSelection.handleEvent(null);
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    showXmlEditor
    @/@actions/@showGuide
    sname
    showGuideEditor
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showGuideEditor
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//进入向导编辑界面
import xworker.swt.ide.utils.ThingGuide;

//先保存
actions.doAction("save");

//第一个默认向导界面是选择向导
new ThingGuide(currentThing, world.getThing("xworker.core.util.ThingGuideSelector"), actionContext);

editPartCompositeStackLayout.topControl = guideComposite;
editPartComposite.layout();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    showGuide
    @/@actions/@nodeDelete1
    sname
    nodeDelete
    sshell
    ognl:innerOutline.getShell()
    sicon
    ICON_WARNING
    sbuttons
    OK | CANCEL
    stitle
    lang:d=移除节点&en=Remove Node
    smessage
    lang:d=确定要删除选中的节点吗？&en=Are you sure to remove current node?
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.swt.actions.MessageBoxActions/@MessageBox
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    nodeDelete1
      @/@actions/@nodeDelete1/@actions
      sname
      actions
      sdescriptors
      xworker.swt.actions.MessageBoxActions/@MessageBox/@actions1
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@actions/@nodeDelete1/@actions/@ok
        sname
        ok
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
        smethodName
        nodeDeleteOk
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.lang.util.UtilData;

if(currentThing.getParent() != null){
    def treeItem = innerOutline.getSelection()[0];
    def parentTreeItem = treeItem.getParentItem();
    treeItem.dispose();
    
    def parent = currentThing.getParent();
    parent.removeChild(currentThing);
    parent.save();
    
    //刷新事物缓存
    thingEntry.getThing();
}else{
    //删除根节点
    removeRoot(actionContext);
}
#$@text#$@
        sattributeTemplate
        false
        sinterpretationType
        Action
        svarScope
        Global
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.JavaAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        ok
          @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined
          sname
          ActionDefined
          sdescriptors
          xworker.lang.actions.Inout/@ActionDefined
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          ActionDefined
            @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined/@removeRoot
            sname
            removeRoot
            sshell
            ognl:innerOutline.getShell()
            sicon
            ICON_WARNING
            sbuttons
            OK | CANCEL
            stitle
            lang:d=删除事物&en=Remove Thing
            smessage
            lang:d=当前节点是根节点，确定要删除整个事物么？&en=Current not is root node, are you sure to remove all?
            sinterpretationType
            Self
            sattributeTemplate
            false
            schildsAttributeTemplate
            false
            svarScope
            Local
            sisSynchronized
            false
            sthrowException
            true
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdisableGlobalContext
            false
            sdebugLog
            false
            sdescriptors
            xworker.swt.actions.MessageBoxActions/@MessageBox
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            removeRoot
              @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined/@removeRoot/@actions
              sname
              actions
              sdescriptors
              xworker.swt.actions.MessageBoxActions/@MessageBox/@actions1
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              actions
                @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined/@removeRoot/@actions/@ok
                sname
                ok
                sthrowException
                true
                suseOtherAction
                false
                suseOuterJava
                true
                suseInnerJava
                false
                souterClassName
                xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                smethodName
                nodeDeleteOKOK
                sdisableGlobalContext
                false
                Scode
#$@text#$@
try{
    //xworker editor
    currentThing.remove();
    contentTab.dispose();
}catch(Exception e){
}
try{
    //XWorker的Workbench框架的关闭
    closeEditor(actionContext);
}catch(Exception e){
}
try{
    //eclipse plugin的关闭
    thingEditor.getEditorSite().getPage().closeEditor(thingEditor, false);
}catch(Exception e){
}
#$@text#$@
                sattributeTemplate
                false
                sinterpretationType
                Action
                svarScope
                Global
                screateLocalVarScope
                false
                ssaveReturn
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.JavaAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                ok
                  @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined/@removeRoot/@actions/@ok/@ActionDefined
                  sname
                  ActionDefined
                  sdescriptors
                  xworker.lang.actions.Inout/@ActionDefined
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  ActionDefined
                    @/@actions/@nodeDelete1/@actions/@ok/@ActionDefined/@removeRoot/@actions/@ok/@ActionDefined/@closeEditor
                    sname
                    closeEditor
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.swt.app.AppActions/@CloseEditor
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    closeEditor
    @/@actions/@hasXWorker
    sname
    hasXWorker
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    hasXWorker
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//返回否是有整个XWorker的环境
return world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.MarkTreeDialog") != null;
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    hasXWorker
    @/@actions/@clearChange
    sname
    clearChange
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
//当编辑器的外部工具改变了事物后，又不想重新刷新界面
if( actionContext.get("thingEntry") != null){
    thingEntry.getThing();
}
#$@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
    clearChange
    @/@actions/@showFormEditor
    sname
    showFormEditor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showFormEditor
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    showFormEditor
    @/@actions/@selectDescriptor
    sname
    selectDescriptor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    selectDescriptor
    sdisableGlobalContext
    false
    sdescription
    <p>选择一个模型的描述者，改变表单编辑器的表单。</p>
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    selectDescriptor
      @/@actions/@selectDescriptor/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      ins
        @/@actions/@selectDescriptor/@ins/@descriptor
        sname
        descriptor
        stype
        org.xmeta.Thing
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        descriptor
    @/@actions/@isFormEditor
    sname
    isFormEditor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    isFormEditor
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    isFormEditor
    @/@actions/@isAddChild
    sname
    isAddChild
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    isAddChild
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    isAddChild
    @/@actions/@isGuideEditor
    sname
    isGuideEditor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    isGuideEditor
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    isGuideEditor
    @/@actions/@getAddChildSelectedDescriptor
    sname
    getAddChildSelectedDescriptor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    getAddChildSelectedDescriptor
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    getAddChildSelectedDescriptor
    @/@actions/@innerOutlineSelection
    sname
    innerOutlineSelection
    srefActionPath
    xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@actions/@openDataObject
    skeepSelf
    true
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@RefAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    innerOutlineSelection
      @/@actions/@innerOutlineSelection/@Variables
      sname
      Variables
      sdescriptors
      xworker.lang.actions.Inout/@Variables
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      sid
      Variables
        @/@actions/@innerOutlineSelection/@Variables/@forceOpen
        sname
        forceOpen
        stype
        boolean
        svalue
        true
        sinterpretationType
        Self
        sattributeTemplate
        false
        schildsAttributeTemplate
        false
        svarScope
        Local
        sisSynchronized
        false
        sthrowException
        true
        screateLocalVarScope
        false
        ssaveReturn
        false
        sswitchResult
        false
        sdisableGlobalContext
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@ValueFactory
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        forceOpen
    @/@actions/@selectNode
    sname
    selectNode
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    selectThing
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    selectNode
    @/@actions/@doAction
    sname
    doAction
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    doAction
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    doAction
      @/@actions/@doAction/@ins
      sisValidate
      false
      sname
      ins
      sdescriptors
      xworker.lang.actions.Inout/@ins
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      snotXmlAttribute
      false
      sjson_isArray
      false
      sid
      ins
        @/@actions/@doAction/@ins/@actionName
        sname
        actionName
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        snotXmlAttribute
        false
        sjson_isArray
        false
        sid
        actionName
        @/@actions/@doAction/@ins/@params
        sname
        params
        stype
        java.util.Map
        stypeCheck
        false
        soptional
        true
        scheck
        false
        scheckLevel
        exception
        sdescriptors
        xworker.lang.actions.Inout/@ins/@param
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        snotXmlAttribute
        false
        sjson_isArray
        false
        sid
        params
    @/@actions/@getValues
    sname
    getValues
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    getValues
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    getValues
    @/@actions/@showEditor1
    sname
    showFormEditor
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    showEditor
    sdisableGlobalContext
    false
    sdescription
    <p>显示编辑器界面，通常是从添加子节点界面切换过来。</p>
    Scode
#$@text#$@
editPartCompositeStackLayout.topControl = contentEditComposite;
editPartComposite.layout();
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    showEditor1
    @/@actions/@nodeHighlight
    sname
    nodeHighlight
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
    smethodName
    nodeHighlight
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    nodeHighlight
  @/@tempShell
  sname
  tempShell
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  true
  sMAX
  true
  sBORDER
  false
  sRESIZE
  false
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  -1
  sheight
  -1
  scenterScreen
  true
  spack
  false
  smaximized
  false
  slabel
  tempShell
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sid
  tempShell
    @/@tempShell/@listenersPrepared
    sname
    listenersPrepared
    slabel
    listenersPrepared
    sdescriptors
    xworker.swt.events.Listeners/@listenersPrepared
    sid
    listenersPrepared
      @/@tempShell/@listenersPrepared/@toolBarItemSelection
      sname
      toolBarItemSelection
      stype
      Selection
      slabel
      toolBarItemSelection
      sdescriptors
      xworker.swt.events.Listeners/@listenersPrepared/@Listener
      sid
      toolBarItemSelection
        @/@tempShell/@listenersPrepared/@toolBarItemSelection/@GroovyAction
        sname
        GroovyAction
        slabel
        GroovyAction
        sisSynchronized
        false
        sthrowException
        false
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorMenuActions
        smethodName
        toolBarItemSelection
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;

def item = event.widget;

Rectangle rect = item.getBounds();
Point pt = new Point(rect.x, rect.y + rect.height);
pt = item.getParent().toDisplay(pt);
def menu = item.getData("menu");
menu.setLocation(pt.x, pt.y);
//menu.update();
menu.setVisible(true);
#$@text#$@
        sattributeTemplate
        false
        sinterpretationType
        Action
        svarScope
        Local
        screateLocalVarScope
        false
        ssaveReturn
        false
        sswitchResult
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.JavaAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_deprecated
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        GroovyAction
      @/@tempShell/@listenersPrepared/@dispose
      sname
      dispose
      stype
      Dispose
      slabel
      dispose
      sdescriptors
      xworker.swt.events.Listeners/@listenersPrepared/@Listener
      sid
      dispose
        @/@tempShell/@listenersPrepared/@dispose/@GroovyAction
        sname
        GroovyAction
        slabel
        GroovyAction
        sisSynchronized
        false
        sthrowException
        false
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorMenuActions
        smethodName
        menuDispose
        sdisableGlobalContext
        false
        Scode
#$@text#$@
def menu = event.widget.getData("menu");
if(menu != null){
    menu.dispose();
}
#$@text#$@
        sattributeTemplate
        false
        sinterpretationType
        Action
        svarScope
        Local
        screateLocalVarScope
        false
        ssaveReturn
        false
        sswitchResult
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.JavaAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_deprecated
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        GroovyAction
      @/@tempShell/@listenersPrepared/@menuSelection
      sname
      menuSelection
      stype
      Selection
      slabel
      menuSelection
      sdescriptors
      xworker.swt.events.Listeners/@listenersPrepared/@Listener
      sid
      menuSelection
        @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction
        sname
        GroovyAction
        slabel
        GroovyAction
        sisSynchronized
        false
        sthrowException
        false
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorMenuActions
        smethodName
        menuSelection
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

import org.xmeta.util.UtilString;
import xworker.lang.util.XWorkerUtils;

String actionUrl = event.widget.getData("url");
def menuThing = event.widget.getData("menu")

try{
    if(actionUrl != null){
        if(actionUrl.startsWith("http:") || actionUrl.startsWith("https:")){
            explorerActions.doAction("openUrl", explorerContext, ["url": actionUrl, "name":actionUrl]);
        }else if(actionUrl == "do?sc="){
            def cfg = world.getThing("_local.xworker.config.GlobalConfig");
            explorerActions.doAction("openUrl", explorerContext, ["url": cfg.getString("webUrl") + actionUrl + currentThing.getMetadata().getPath(), "name":actionUrl]);
        }else if(actionUrl.startsWith("do?")){
            def cfg = world.getThing("_local.xworker.config.GlobalConfig");
            explorerActions.doAction("openUrl", explorerContext, ["url": cfg.getString("webUrl") + actionUrl + "&currentThing=" + currentThing.getMetadata().getPath(), "name":actionUrl]);
        }else if(actionUrl == "doc"){
            def url = XWorkerUtils.getThingDescUrl(currentThing);
            explorerActions.doAction("openUrl", explorerContext, ["url": url, "name":currentThing.getMetadata().getPath()]);
        }else if(actionUrl.startsWith("action:")){
            def actionName = actionUrl.substring(7, actionUrl.length());
            currentThing.doAction(actionName, actionContext);
        }else{
            def action = world.getAction(actionUrl);
            //log.info(actionUrl);
            if(action != null){    
                action.run(actionContext);
            }
        }
    }else if(menuThing.shell != null){
        def shellPath = menuThing.shell;
        def index = shellPath.indexOf("?");
        def params = [:];
        if(index != -1){
            def paramsStr = shellPath.substring(index + 1, shellPath.length());
            shellPath = shellPath.substring(0, index);
            params = UtilString.getParams(paramsStr); 
        }
        def shellThing = world.get(shellPath);
        if(shellThing != null){
            ActionContext context = new ActionContext();
            context.put("parent", coolBar.getShell());
            context.put("editorShell", coolBar.getShell());
            context.put("explorerActions", explorerActions);
            context.put("explorerContext", explorerContext);
            context.put("thingContext", actionContext);
            context.put("utilBrowser", utilBrowser);
            context.put("thing", currentThing);
            context.put("currentThing", currentThing);
            context.put("currentModelContext", currentModelContext);
            context.put("currentModel", currentModel);
            context.put("params", params);
            context.put("editorContext", actionContext);
            context.put("editorActions", actions);
            
            def newShell = shellThing.doAction("create", context);
            if(newShell != null){
                if(newShell.getData("menuShellDispose") == true){
                    newShell.dispose();
                }else{
                    newShell.open();
                }
            }
        }else{
            log.info("shell thing is not exists, path=" + menuThing.shell);
            throw new Exception("窗体不存在, path=" + menuThing.shell);
        }
    }else{
        log.info("menu action is null");
        throw new Exception("需要设置动作或窗体。");
    }
}catch(Exception e){
    log.error("open thing menu errror", e);
    showMessage.run(actionContext, "message", e.getMessage());
}
#$@text#$@
        sattributeTemplate
        false
        sinterpretationType
        Action
        svarScope
        Global
        screateLocalVarScope
        false
        ssaveReturn
        false
        sswitchResult
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.JavaAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_deprecated
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        sid
        GroovyAction
          @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction/@ActionDefined
          sname
          ActionDefined
          sdescriptors
          xworker.lang.actions.Inout/@ActionDefined
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          ActionDefined
            @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction/@ActionDefined/@removeDesc
            sname
            showMessage
            sshell
            ognl:contentComposite.getShell()
            sicon
            ICON_WARNING
            sbuttons
            OK
            stitle
            lang:d=异常&en=Exception
            smessage
            var:message
            sinterpretationType
            Self
            sattributeTemplate
            false
            schildsAttributeTemplate
            false
            svarScope
            Local
            sisSynchronized
            false
            sthrowException
            true
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdisableGlobalContext
            false
            sdebugLog
            false
            sdescriptors
            xworker.swt.actions.MessageBoxActions/@MessageBox
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            removeDesc
            @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction/@ActionDefined/@showException
            sname
            showException
            sshell
            ognl:contentComposite.getShell()
            sthrowable
            var:exception
            sinterpretationType
            Self
            sattributeTemplate
            false
            schildsAttributeTemplate
            false
            svarScope
            Local
            sisSynchronized
            false
            sthrowException
            true
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            false
            sdisableGlobalContext
            false
            sdebugLog
            false
            sdescriptors
            xworker.swt.actions.DialogActions/@ShowExceptionDialog
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            sid
            showException
          @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction/@Variables
          sname
          Variables
          sdescriptors
          xworker.lang.actions.Inout/@Variables
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sid
          Variables
            @/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction/@Variables/@log
            sname
            log
            stagName
            xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@listenersPrepared/@menuSelection/@GroovyAction
            saction
            true
            sinterpretationType
            Self
            sattributeTemplate
            false
            schildsAttributeTemplate
            false
            svarScope
            Local
            sisSynchronized
            false
            sthrowException
            true
            screateLocalVarScope
            false
            ssaveReturn
            false
            sdisableGlobalContext
            false
            sdebugLog
            false
            sdescriptors
            xworker.core.actions.log.LoggerActions/@Sl4jLogger
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sid
            log
    @/@tempShell/@innerOutlineDragMenu
    sname
    innerOutlineDragMenu
    sstyle
    POP_UP
    sNO_RADIO_GROUP
    false
    salign
    LEFT_TO_RIGHT
    svisible
    false
    senabled
    true
    sdescriptors
    xworker.swt.widgets.Control/@Menu
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    innerOutlineDragMenu
      @/@tempShell/@innerOutlineDragMenu/@preItem
      sname
      preItem
      stext
      lang:d=插入前面&en=Inert before
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      preItem
        @/@tempShell/@innerOutlineDragMenu/@preItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
            @/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Local
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import xworker.swt.util.XWorkerTreeUtil;

def sourceItem = findSourceItem(innerOutline, thing);
def sourceThing = thing.detach();

def netItem = null;
def index = targetItem.getParentItem().indexOf(targetItem);
if(event.widget == preItem || event.widget == copyPreItem){
    targetThing.getParent().addChild(sourceThing, index);
    createItem(innerOutline, sourceThing, targetItem.getParentItem(), index);
} else if(event.widget == nextItem || event.widget == copyNextItem){
    targetThing.getParent().addChild(sourceThing, index + 1);
    createItem(innerOutline, sourceThing, targetItem.getParentItem(), index + 1);
}else{
    targetThing.addChild(sourceThing);
    createItem(innerOutline, sourceThing, targetItem, -1);
}

if(event.widget == preItem || event.widget == nextItem || event.widget == insideItem){
    thing.getParent().removeChild(thing);
    sourceItem.dispose();
}

//保存事物
targetThing.save();

//更新编辑器事物缓存时间
thingEntry.getThing();
//销毁菜单
event.widget.getParent().dispose();


def createItem(innerOutline, newThing, parentTreeItem, index){
    def item = null;
    if(index >= 0){
       item = new TreeItem(parentTreeItem, SWT.NONE, index);
    }else{
        item = new TreeItem(parentTreeItem, SWT.NONE);
    }

    item.setData(newThing);
    item.setText(newThing.metadata.label+ " (" + newThing.thingName + ")");
    XWorkerTreeUtil.initItem(item, newThing, actionContext);
    
    for(child in newThing.childs){
        init(item, child);
    }

    //item.setExpanded(true);
    innerOutline.setSelection(item); 
    parentContext.g().put("currentThing", newThing);
}

def init(treeItem, dataObj){
    TreeItem childItem = new TreeItem(treeItem, SWT.NONE);
    childItem.setData(dataObj);
    childItem.setText(dataObj.metadata.label + " (" + dataObj.thingName + ")");
    //childItem.setImage(Resources.getImage("dataObject.png"));
    XWorkerTreeUtil.initItem(childItem, dataObj, actionContext);
    
    for(child in dataObj.childs){
        init(childItem, child);
    }
}

def findSourceItem(item, thing){
    if(item.getData() == thing){
        return item;
    }
    
    for(citem in item.getItems()){
        def it = findSourceItem(citem, thing);
        if(it != null){
            return it;
        }
    }
    
    return 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
      @/@tempShell/@innerOutlineDragMenu/@nextItem
      sname
      nextItem
      stext
      lang:d=插入后面&en=Insert after
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      nextItem
        @/@tempShell/@innerOutlineDragMenu/@nextItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@nextItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sref
          xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
      @/@tempShell/@innerOutlineDragMenu/@insideItem
      sname
      insideItem
      stext
      lang:d=插入里面&en=Insert inside
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      insideItem
        @/@tempShell/@innerOutlineDragMenu/@insideItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@insideItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sref
          xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
      @/@tempShell/@innerOutlineDragMenu/@copyPreItem
      sname
      copyPreItem
      stext
      lang:d=拷贝插入前面&en=Copy & Insert before
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      copyPreItem
        @/@tempShell/@innerOutlineDragMenu/@copyPreItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@copyPreItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sref
          xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
      @/@tempShell/@innerOutlineDragMenu/@copyNextItem
      sname
      copyNextItem
      stext
      lang:d=拷贝插入后面&en=Copy & Insert after
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      copyNextItem
        @/@tempShell/@innerOutlineDragMenu/@copyNextItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@copyNextItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sref
          xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
      @/@tempShell/@innerOutlineDragMenu/@copyInsideItem
      sname
      copyInsideItem
      stext
      lang:d=拷贝插入里面&en=Copy & Insert inside
      sselected
      false
      senabled
      true
      sdescriptors
      xworker.swt.widgets.Menu/@MenuItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      copyInsideItem
        @/@tempShell/@innerOutlineDragMenu/@copyInsideItem/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        listeners
          @/@tempShell/@innerOutlineDragMenu/@copyInsideItem/@listeners/@Listener
          sname
          Listener
          stype
          Selection
          sref
          xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@tempShell/@innerOutlineDragMenu/@preItem/@listeners/@Listener/@GroovyAction
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          Listener
  @/@outlineBrowser
  sname
  outlineBrowserSashForm
  sstyle
  VERTICAL
  sSMOOTH
  false
  sweights
  75,25
  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
  slabel
  outlineBrowserSashForm
  scapture
  false
  senabled
  true
  sredraw
  true
  spack
  false
  svisible
  true
  sdescriptors
  xworker.swt.custom.SashForm
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  outlineBrowser
    @/@outlineBrowser/@resources
    sname
    resources
    sdescriptors
    xworker.swt.Widgets/@Resource
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    resources
      @/@outlineBrowser/@resources/@attributeImage
      sname
      attributeImage
      stype
      Image
      simageFile
      icons/org/eclipse/elcl16/flatLayout.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      attributeImage
      @/@outlineBrowser/@resources/@classImage
      sname
      classImage
      stype
      Image
      simageFile
      icons/org/eclipse/elcl16/class_obj.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      classImage
      @/@outlineBrowser/@resources/@extendsImage
      sname
      extendsImage
      stype
      Image
      simageFile
      icons/org/eclipse/elcl16/ch_callers.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      extendsImage
      @/@outlineBrowser/@resources/@actionsImage
      sname
      actionsImage
      stype
      Image
      simageFile
      icons/org/eclipse/elcl16/public_co.gif
      sdescriptors
      xworker.swt.util.Resource/@Image
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actionsImage
    @/@outlineBrowser/@outlineBrowser
    sname
    outlineBrowser
    sWEBKIT
    false
    sjavascriptEnabled
    true
    sdescriptors
    xworker.swt.Widgets/@Browser
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    outlineBrowser
      @/@outlineBrowser/@outlineBrowser/@outlineUtilBrowser
      sname
      outlineUtilBrowser
      sdescriptors
      xworker.swt.browser.Browser/@UtilBrowser
      sid
      outlineUtilBrowser
    @/@outlineBrowser/@relationTabFolder
    sname
    relationTabFolder
    sstyle
    TOP
    sBORDER
    true
    sFLAT
    true
    sCLOSE
    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
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@CTabFolder
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    relationTabFolder
      @/@outlineBrowser/@relationTabFolder/@tipTabItem
      sname
      tipTabItem
      stext
      lang:d=工具&en=Tools
      sCLOSE
      false
      simage
      icons/lightbulb.png
      sdelayReload
      false
      sdescriptors
      xworker.swt.custom.CTabFolder/@CTabItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      snotXmlAttribute
      false
      sjson_isArray
      false
      sgroupDescriptor
      false
      sid
      tipTabItem
        @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite
        sname
        outlineToolTipComposite
        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.swt.Widgets/@Composite
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_noThingRegistViewer
        false
        sth_fileMonitor
        false
        sth_mark
        false
        sth_registQueryOnlySelf
        false
        snotXmlAttribute
        false
        sjson_isArray
        false
        sgroupDescriptor
        false
        sid
        outlineToolTipComposite
          @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@GridLayout
          sname
          GridLayout
          smakeColumnsEqualWidth
          false
          smarginWidth
          0
          smarginHeight
          0
          smarginLeft
          0
          smarginTop
          0
          smarginRight
          0
          smarginBottom
          0
          shorizontalSpacing
          0
          sverticalSpacing
          0
          sdescriptors
          xworker.swt.Layouts/@GridLayout
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_noThingRegistViewer
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          snotXmlAttribute
          false
          sjson_isArray
          false
          sgroupDescriptor
          false
          sid
          GridLayout
          @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable
          sname
          outlineTipTable
          sselectStyle
          SINGLE
          sV_SCROLL
          true
          sH_SCROLL
          true
          sCHECK
          false
          sFULL_SELECTION
          true
          sHIDE_SELECTION
          true
          sBORDER
          false
          slineVisible
          true
          smultipleColumns
          true
          sheaderVisible
          false
          ssortIndicator
          true
          smoveableColumns
          true
          sheadImages
          false
          ssubImages
          false
          sVIRTUAL
          false
          scapture
          false
          senabled
          true
          sredraw
          true
          spack
          false
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Table
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_noThingRegistViewer
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          snotXmlAttribute
          false
          sjson_isArray
          false
          sgroupDescriptor
          false
          sid
          outlineTipTable
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@tipColumn
            sname
            tipColumn
            swidth
            300
            sdescriptors
            xworker.swt.widgets.Table/@TableColumn
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            tipColumn
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            Listeners
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection
              sname
              outlineTipTableSelection
              stype
              Selection
              sexceptionDialog
              false
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              outlineTipTableSelection
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection/@JavaAction
                sname
                JavaAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                suseOuterJava
                true
                suseInnerJava
                false
                souterClassName
                xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                smethodName
                outlineTipTableSelection
                sdisableGlobalContext
                false
                sattributeTemplate
                false
                sinterpretationType
                Action
                svarScope
                Global
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.Actions/@JavaAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                JavaAction
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection1
              sname
              outlineTipTableDefaultSelection
              stype
              DefaultSelection
              sexceptionDialog
              false
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              outlineTipTableSelection1
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection1/@JavaAction
                sname
                JavaAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                suseOuterJava
                true
                suseInnerJava
                false
                souterClassName
                xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                smethodName
                outlineTipTableDefaultSelection
                sdisableGlobalContext
                false
                sattributeTemplate
                false
                sinterpretationType
                Action
                svarScope
                Global
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.Actions/@JavaAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                JavaAction
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableKeyDown
              sname
              outlineTipTableKeyDown
              stype
              KeyDown
              sexceptionDialog
              false
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              outlineTipTableKeyDown
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableKeyDown/@JavaAction
                sname
                JavaAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                suseOuterJava
                true
                suseInnerJava
                false
                souterClassName
                xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                smethodName
                outlineTipTableKeyDown
                sdisableGlobalContext
                false
                sattributeTemplate
                false
                sinterpretationType
                Action
                svarScope
                Global
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.Actions/@JavaAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                JavaAction
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@GridData
            sname
            GridData
            sstyle
            FILL_BOTH
            shorizontalIndent
            0
            swidth
            -1
            sheight
            -1
            shorizontalAlignment
            BEGINNING
            sverticalAlignment
            CENTER
            shorizontalSpan
            1
            sverticalSpan
            1
            sgrabExcessHorizontalSpace
            false
            sgrabExcessVerticalSpace
            false
            sdescriptors
            xworker.swt.layout.LayoutDatas/@GridData
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            GridData
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu
            sname
            outlineTipTablePopMenu
            sstyle
            POP_UP
            sNO_RADIO_GROUP
            false
            salign
            LEFT_TO_RIGHT
            svisible
            true
            senabled
            true
            sdescriptors
            xworker.swt.widgets.Control/@Menu
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            outlineTipTablePopMenu
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenThingMenuItem
              sname
              toolTipOpenThingMenuItem
              stext
              lang:d=打开模型&en=Open Thing
              sstyle
              PUSH
              sselected
              false
              senabled
              true
              sdescriptors
              xworker.swt.widgets.Menu/@MenuItem
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              toolTipOpenThingMenuItem
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenThingMenuItem/@listeners
                sname
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                listeners
                  @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenThingMenuItem/@listeners/@toolTipExecuteMenuItemSelection
                  sname
                  toolTipOpenThingMenuItemSelection
                  stype
                  Selection
                  sexceptionDialog
                  false
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sth_fileMonitor
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  snotXmlAttribute
                  false
                  sjson_isArray
                  false
                  sgroupDescriptor
                  false
                  sid
                  toolTipExecuteMenuItemSelection
                    @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenThingMenuItem/@listeners/@toolTipExecuteMenuItemSelection/@ideOpenThing
                    sname
                    ideOpenThing
                    sthing
                    ognl:outlineTipTable.getSelection()[0].data.getThing()
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    suseOtherAction
                    false
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sswitchResult
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.core.actions.utils.XWorkerActions/@ideOpenThing
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_noThingRegistViewer
                    false
                    sth_fileMonitor
                    false
                    sth_mark
                    false
                    sth_registQueryOnlySelf
                    false
                    snotXmlAttribute
                    false
                    sjson_isArray
                    false
                    sgroupDescriptor
                    false
                    sid
                    ideOpenThing
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenProviderMenuItem
              sname
              toolTipOpenProviderMenuItem
              stext
              lang:d=打开提供者模型&en=Open Provider
              sstyle
              PUSH
              sselected
              false
              senabled
              true
              sdescriptors
              xworker.swt.widgets.Menu/@MenuItem
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              toolTipOpenProviderMenuItem
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenProviderMenuItem/@listeners
                sname
                listeners
                sdescriptors
                xworker.swt.events.Listeners/@listeners
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                listeners
                  @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenProviderMenuItem/@listeners/@toolTipExecuteMenuItemSelection
                  sname
                  toolTipOpenProviderMenuItemSelection
                  stype
                  Selection
                  sexceptionDialog
                  false
                  sdescriptors
                  xworker.swt.events.Listeners/@listeners/@Listener
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sth_fileMonitor
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  snotXmlAttribute
                  false
                  sjson_isArray
                  false
                  sgroupDescriptor
                  false
                  sid
                  toolTipExecuteMenuItemSelection
                    @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@outlineTipTablePopMenu/@toolTipOpenProviderMenuItem/@listeners/@toolTipExecuteMenuItemSelection/@ideOpenThing
                    sname
                    ideOpenThing
                    sthing
                    ognl:outlineTipTable.getSelection()[0].data.getProvider()
                    sinterpretationType
                    Self
                    sattributeTemplate
                    false
                    schildsAttributeTemplate
                    false
                    svarScope
                    Local
                    sisSynchronized
                    false
                    sthrowException
                    true
                    suseOtherAction
                    false
                    screateLocalVarScope
                    false
                    ssaveReturn
                    false
                    sswitchResult
                    false
                    sdisableGlobalContext
                    false
                    sdebugLog
                    false
                    sdescriptors
                    xworker.core.actions.utils.XWorkerActions/@ideOpenThing
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_noThingRegistViewer
                    false
                    sth_fileMonitor
                    false
                    sth_mark
                    false
                    sth_registQueryOnlySelf
                    false
                    snotXmlAttribute
                    false
                    sjson_isArray
                    false
                    sgroupDescriptor
                    false
                    sid
                    ideOpenThing
          @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText
          sname
          outlineToolTipSearchText
          sstyle
          SINGLE
          sH_SCROLL
          false
          sV_SCROLL
          false
          sWRAP
          false
          sREAD_ONLY
          false
          sPASSWORD
          false
          sSEARCH
          false
          sCANCEL
          false
          sBORDER
          true
          salign
          LEFT
          scapture
          false
          senabled
          true
          sredraw
          true
          spack
          false
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@Text
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_noThingRegistViewer
          false
          sth_fileMonitor
          false
          sth_mark
          false
          sth_registQueryOnlySelf
          false
          snotXmlAttribute
          false
          sjson_isArray
          false
          sgroupDescriptor
          false
          sid
          outlineToolTipSearchText
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@GridData
            sname
            GridData
            sstyle
            FILL_HORIZONTAL
            shorizontalIndent
            0
            swidth
            -1
            sheight
            -1
            shorizontalAlignment
            BEGINNING
            sverticalAlignment
            CENTER
            shorizontalSpan
            1
            sverticalSpan
            1
            sgrabExcessHorizontalSpace
            false
            sgrabExcessVerticalSpace
            false
            sdescriptors
            xworker.swt.layout.LayoutDatas/@GridData
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            GridData
            @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@Listeners
            sname
            Listeners
            sdescriptors
            xworker.swt.widgets.Widget/@Listeners
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_noThingRegistViewer
            false
            sth_fileMonitor
            false
            sth_mark
            false
            sth_registQueryOnlySelf
            false
            snotXmlAttribute
            false
            sjson_isArray
            false
            sgroupDescriptor
            false
            sid
            Listeners
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@Listeners/@outlineToolTipSearchTextModify
              sname
              outlineToolTipSearchTextModify
              stype
              Modify
              sexceptionDialog
              false
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              snotXmlAttribute
              false
              sjson_isArray
              false
              sgroupDescriptor
              false
              sid
              outlineToolTipSearchTextModify
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@Listeners/@outlineToolTipSearchTextModify/@JavaAction
                sname
                JavaAction
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                suseOuterJava
                true
                suseInnerJava
                false
                souterClassName
                xworker.swt.ide.worldexplorer.editor.thingEditor.ThingEditorActions
                smethodName
                showToolTipItems
                sdisableGlobalContext
                false
                sattributeTemplate
                false
                sinterpretationType
                Action
                svarScope
                Global
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.lang.actions.Actions/@JavaAction
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_noThingRegistViewer
                false
                sth_fileMonitor
                false
                sth_mark
                false
                sth_registQueryOnlySelf
                false
                snotXmlAttribute
                false
                sjson_isArray
                false
                sgroupDescriptor
                false
                sid
                JavaAction
              @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@Listeners/@childKeyTextKeydown
              sname
              outlineToolTipSearchTextKeydown
              stype
              KeyDown
              sexceptionDialog
              false
              sdescriptors
              xworker.swt.events.Listeners/@listeners/@Listener
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              childKeyTextKeydown
                @/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineToolTipSearchText/@Listeners/@childKeyTextKeydown/@KeyTravel
                sname
                KeyTravel
                swidget
                outlineTipTable
                sdefaultSelection
                xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection1/@JavaAction
                sselectionListener
                xworker.swt.ide.worldexplorer.swt.dataExplorerParts.ThingEditor/@outlineBrowser/@relationTabFolder/@tipTabItem/@outlineToolTipComposite/@outlineTipTable/@Listeners/@outlineTipTableSelection/@JavaAction
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdisableGlobalContext
                false
                sdebugLog
                false
                sdescriptors
                xworker.swt.actions.EventActions/@KeyTravel
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                KeyTravel
      @/@outlineBrowser/@relationTabFolder/@behaviorTabItem
      sname
      behaviorTabItem
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Relations/@behaviorTabItem
      sCLOSE
      false
      simage
      actionsImage
      sdescriptors
      xworker.swt.custom.CTabFolder/@CTabItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      behaviorTabItem
        @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable
        sname
        actionsTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        true
        sBORDER
        false
        slineVisible
        true
        smultipleColumns
        true
        sheaderVisible
        true
        ssortIndicator
        true
        smoveableColumns
        true
        sheadImages
        false
        ssubImages
        false
        sVIRTUAL
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Table
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        actionsTable
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@ePathColumn
          sname
          ePathColumn
          stext
          lang:d=名称&en=Name
          swidth
          150
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          ePathColumn
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@acTypeLabel1
          sname
          usageColumn
          stext
          lang:d=用途&en=Usage
          swidth
          100
          sdescriptors
          xworker.swt.widgets.Table/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          acTypeLabel1
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@acTypeLabel
          sname
          acTypeColumn
          stext
          lang:d=类型&en=Type
          swidth
          150
          sdescriptors
          xworker.swt.widgets.Table/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          acTypeLabel
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@acDefineInTableColumn
          sname
          acDefineInTableColumn
          stext
          lang:d=定义在&en=Defined In
          swidth
          250
          sdescriptors
          xworker.swt.widgets.Table/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          acDefineInTableColumn
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          listeners
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@listeners/@extendsTableSelection
            sname
            actionsTableSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableSelection
              @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@listeners/@extendsTableSelection/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
              smethodName
              actionsTableSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
import xworker.swt.util.SwtUtils;
//获取选中的事物路径
def item = event.widget.getSelection()[0];

//在浏览器中显示文档
def thing = world.getThing(item.getData().path);

if(thing.getStringBlankAsNull("description") == null){
    SwtUtils.setThingDesc(thing.getDescriptor(), outlineBrowser);
//    outlineBrowser.setUrl(XWorkerUtils.getThingDescUrl(thing.getDescriptor()));
}else{
    SwtUtils.setThingDesc(thing, outlineBrowser);
    //outlineBrowser.setUrl(XWorkerUtils.getThingDescUrl(thing));
}
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Local
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              GroovyAction
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@listeners/@extendsTableDefaultSelection
            sname
            actionsTableDefaultSelection
            stype
            DefaultSelection
            sref
            descriptorsTableDefaultSelection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableDefaultSelection
          @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu
          sname
          actionsTableMenu
          sstyle
          POP_UP
          sNO_RADIO_GROUP
          false
          salign
          LEFT_TO_RIGHT
          svisible
          true
          senabled
          true
          sdescriptors
          xworker.swt.widgets.Control/@Menu
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          actionsTableMenu
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@viewTypeMenuItem
            sname
            viewTypeMenuItem
            stext
            lang:d=显示类型文档&en=Show Type Document
            sselected
            false
            senabled
            true
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            viewTypeMenuItem
              @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@viewTypeMenuItem/@listeners
              sname
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              listeners
                @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@viewTypeMenuItem/@listeners/@viewTypeMenuItemSelection
                sname
                viewTypeMenuItemSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                viewTypeMenuItemSelection
                  @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@viewTypeMenuItem/@listeners/@viewTypeMenuItemSelection/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                  smethodName
                  actionsViewTypeMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;

//获取选中的事物路径
def item = actionsTable.getSelection()[0];

//在浏览器中显示文档
def thing = world.getThing(item.getData().path).getDescriptor();
outlineBrowser.setUrl(XWorkerUtils.getThingDescUrl(thing));
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Local
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sswitchResult
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.Actions/@JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sth_fileMonitor
                  false
                  sth_deprecated
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  sid
                  GroovyAction
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@splitMenuItem
            sname
            splitMenuItem
            sstyle
            SEPARATOR
            sselected
            false
            senabled
            true
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            splitMenuItem
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunItem
            sname
            acTableMenuRunItem
            stext
            lang:d=运行&en=Execute
            sselected
            false
            senabled
            true
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            acTableMenuRunItem
              @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunItem/@listeners
              sname
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              listeners
                @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunItem/@listeners/@acTableMenuRunItemSelection
                sname
                acTableMenuRunItemSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                acTableMenuRunItemSelection
                  @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunItem/@listeners/@acTableMenuRunItemSelection/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                  smethodName
                  actionsExecuteMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
def actionName = actionsTable.getSelection()[0].getData("name");
def thing = actions.doAction("getCurrentThing", actionContext);;
println thing.doAction(actionName, actionContext);
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Local
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sswitchResult
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.Actions/@JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sth_fileMonitor
                  false
                  sth_deprecated
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  sid
                  GroovyAction
            @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunBackgroundITem
            sname
            acTableMenuRunBackgroundITem
            stext
            lang:d=后台运行&en=Execute In New Thread
            sselected
            false
            senabled
            true
            sdescriptors
            xworker.swt.widgets.Menu/@MenuItem
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            acTableMenuRunBackgroundITem
              @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunBackgroundITem/@listeners
              sname
              listeners
              sdescriptors
              xworker.swt.events.Listeners/@listeners
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              listeners
                @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunBackgroundITem/@listeners/@acTableMenuRunItemSelection
                sname
                acTableMenuRunBackgroundITemSelection
                stype
                Selection
                sdescriptors
                xworker.swt.events.Listeners/@listeners/@Listener
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                acTableMenuRunItemSelection
                  @/@outlineBrowser/@relationTabFolder/@behaviorTabItem/@actionsTable/@actionsTableMenu/@acTableMenuRunBackgroundITem/@listeners/@acTableMenuRunItemSelection/@GroovyAction
                  sname
                  GroovyAction
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  suseOuterJava
                  true
                  suseInnerJava
                  false
                  souterClassName
                  xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
                  smethodName
                  actionsExecuteBackMenuSelection
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
def actionName = actionsTable.getSelection()[0].getData("name");
def thing = actions.doAction("getCurrentThing", actionContext);;
def actionContext = actionContext;
new Thread({
    println thing.doAction(actionName, actionContext);
}).start();
#$@text#$@
                  sattributeTemplate
                  false
                  sinterpretationType
                  Action
                  svarScope
                  Local
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sswitchResult
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.Actions/@JavaAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_noThingRegistViewer
                  false
                  sth_fileMonitor
                  false
                  sth_deprecated
                  false
                  sth_mark
                  false
                  sth_registQueryOnlySelf
                  false
                  sid
                  GroovyAction
      @/@outlineBrowser/@relationTabFolder/@extendsItem1
      sname
      attributesTabItem
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Relations/@attributesTabItem
      sCLOSE
      false
      simage
      attributeImage
      sdescriptors
      xworker.swt.custom.CTabFolder/@CTabItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      extendsItem1
        @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable
        sname
        attributesTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        true
        sBORDER
        false
        slineVisible
        true
        smultipleColumns
        true
        sheaderVisible
        true
        ssortIndicator
        true
        smoveableColumns
        true
        sheadImages
        false
        ssubImages
        false
        sVIRTUAL
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Table
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        actionsTable
          @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@attrPathColumn
          sname
          attrPathColumn
          stext
          lang:d=名称&en=Name
          swidth
          150
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          attrPathColumn
          @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@acTypeLabel
          sname
          attrTypeColumn
          stext
          lang:d=值&en=Value
          swidth
          100
          sdescriptors
          xworker.swt.widgets.Table/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          acTypeLabel
          @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@attrDefineInTableColumn
          sname
          attrDefineInTableColumn
          stext
          lang:d=定义在&en=Defined In
          swidth
          250
          sdescriptors
          xworker.swt.widgets.Table/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          attrDefineInTableColumn
          @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          listeners
            @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@listeners/@extendsTableSelection
            sname
            actionsTableSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableSelection
              @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@listeners/@extendsTableSelection/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
              smethodName
              attributeTableSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
import xworker.swt.util.SwtUtils;

//获取选中的事物路径
def item = event.widget.getSelection()[0];

//在浏览器中显示文档
def thing = world.getThing(item.getData().path);
SwtUtils.setThingDesc(thing, outlineBrowser);
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Local
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              GroovyAction
            @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@listeners/@extendsTableDefaultSelection
            sname
            actionsTableDefaultSelection
            stype
            DefaultSelection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableDefaultSelection
              @/@outlineBrowser/@relationTabFolder/@extendsItem1/@actionsTable/@listeners/@extendsTableDefaultSelection/@1614
              sname
              attriuteDefaultSelectionGroovy
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
              smethodName
              attributeTableDefaultSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import org.xmeta.ActionContext;
import org.xmeta.Thing;

import xworker.swt.util.SwtDialog;

//属性的描述者
def name = event.item.getData("name");
def thing = actions.doAction("xmlEditorGetSelectThing", actionContext);
if(thing == null){
    return;
}

def descriptor = thing.getAttributeDescriptor(name);

if(descriptor != null){
    def ac = new ActionContext();
    ac.put("parent", attributesTable.getShell());
    ac.put("thing", thing.getRoot().getMetadata().getPath());
    ac.put("currentThing", thing);
    ac.put("ec", actionContext);
    
    def desthing = new Thing("xworker.lang.MetaDescriptor3");
    desthing.addChild(descriptor.detach());
    
    def newThing = new Thing(desthing.getMetadata().getPath());
    newThing.put(name, thing.get(name));
    
    def shellThing = world.getThing("xworker.swt.ide.worldexplorer.swt.command.EditAttributeShell");
    def shell = shellThing.doAction("create", ac);
    shell.setText("编辑属性-" + descriptor.getMetadata().getName() 
              + "(" + descriptor.getMetadata().getLabel() + ")");
    ac.thingForm.doAction("setThing", ac, ["thing": newThing]);
    shell.open();
    ac.thingForm.doAction("setFocus", ac);
    
    def dialog = new SwtDialog(shell, ac);
    def result = dialog.open();
    if(result != null){
        thing.put(name, result.get(name));
        //重新刷新XML
        actions.doAction("xmlEditorSetXmlThing", actionContext, "thing", thing.getRoot());
        
        actions.doAction("xmlEditorShowThing", actionContext, "thing", thing);
    }
}
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Local
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              1614
      @/@outlineBrowser/@relationTabFolder/@classTabItem
      sname
      classTabItem
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Relations/@classTabItem
      sCLOSE
      false
      simage
      classImage
      sdescriptors
      xworker.swt.custom.CTabFolder/@CTabItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      classTabItem
        @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable
        sname
        descriptorsTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        false
        sBORDER
        false
        slineVisible
        true
        smultipleColumns
        true
        sheaderVisible
        true
        ssortIndicator
        true
        smoveableColumns
        true
        sheadImages
        false
        ssubImages
        false
        sVIRTUAL
        false
        scolumnNames
        ["name", "path"] as String[]
        sdescriptors
        xworker.swt.Widgets/@DataTable
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        descriptorsTable
          @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@dNameColumn
          sname
          dNameColumn
          stext
          label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@thingTableColumn/@name
          swidth
          0
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          dNameColumn
          @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@dPathColumn
          sname
          dPathColumn
          stext
          label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@thingTableColumn/@path
          swidth
          560
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          dPathColumn
          @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          listeners
            @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@listeners/@descriptorsTableSelection
            sname
            descriptorsTableSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            descriptorsTableSelection
              @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@listeners/@descriptorsTableSelection/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
              smethodName
              descriptorTableSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableItem;
import xworker.swt.util.SwtUtils;

//获取选中的事物路径
def item = event.widget.getSelection()[0];

//在浏览器中显示文档
def thing = world.getThing(item.getData().path);
SwtUtils.setThingDesc(thing, outlineBrowser);
//outlineBrowser.setUrl(XWorkerUtils.getThingDescUrl(thing));

//动作文档
actions.doAction("initOutlineThingActions", actionContext, ["thing": thing]);
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              GroovyAction
            @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@listeners/@descriptorsTableDefaultSelection
            sname
            descriptorsTableDefaultSelection
            stype
            DefaultSelection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            descriptorsTableDefaultSelection
              @/@outlineBrowser/@relationTabFolder/@classTabItem/@descriptorsTable/@listeners/@descriptorsTableDefaultSelection/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.swt.ide.worldexplorer.editor.thingEditor.OutlineActions
              smethodName
              descriptorTableDefaultSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;

def item = event.widget.getSelection()[0];
def thing = world.getThing(item.getData().path);

XWorkerUtils.ideOpenThing(thing);
#$@text#$@
              sattributeTemplate
              false
              sinterpretationType
              Action
              svarScope
              Global
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@JavaAction
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_noThingRegistViewer
              false
              sth_fileMonitor
              false
              sth_deprecated
              false
              sth_mark
              false
              sth_registQueryOnlySelf
              false
              sid
              GroovyAction
      @/@outlineBrowser/@relationTabFolder/@extendsItem
      sname
      extendsTabItem
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@Relations/@extendsTabItem
      sCLOSE
      false
      simage
      extendsImage
      sdescriptors
      xworker.swt.custom.CTabFolder/@CTabItem
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      extendsItem
        @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable
        sname
        extendsTable
        sselectStyle
        SINGLE
        sV_SCROLL
        true
        sH_SCROLL
        true
        sCHECK
        false
        sFULL_SELECTION
        true
        sHIDE_SELECTION
        false
        sBORDER
        false
        slineVisible
        true
        smultipleColumns
        true
        sheaderVisible
        true
        ssortIndicator
        true
        smoveableColumns
        true
        sheadImages
        false
        ssubImages
        false
        sVIRTUAL
        false
        scolumnNames
        ["name", "path"] as String[]
        sdescriptors
        xworker.swt.Widgets/@DataTable
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        extendsTable
          @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable/@eNameColumn
          sname
          eNameColumn
          stext
          label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@thingTableColumn/@name
          swidth
          0
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          eNameColumn
          @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable/@ePathColumn
          sname
          ePathColumn
          stext
          label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@thingTableColumn/@path
          swidth
          560
          sdescriptors
          xworker.swt.xworker.DataTable/@TableColumn
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          ePathColumn
          @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          listeners
            @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable/@listeners/@extendsTableSelection
            sname
            extendsTableSelection
            stype
            Selection
            sref
            descriptorsTableSelection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableSelection
            @/@outlineBrowser/@relationTabFolder/@extendsItem/@extendsTable/@listeners/@extendsTableDefaultSelection
            sname
            extendsTableDefaultSelection
            stype
            DefaultSelection
            sref
            descriptorsTableDefaultSelection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            extendsTableDefaultSelection
    @/@outlineBrowser/@InteractiveUI
    sname
    InteractiveUI
    slabel
    模型编辑器概要栏
    sregistType
    notes
    scommandIndex
    xworker.ide.worldexplorer.swt.help.commander.ThingEditorOutline
    spriority
    0
    sen_label
    ThingEditor Outline
    sen_group
    Thing Editor
    sdescriptors
    xworker.swt.Widgets/@InteractiveUI
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sgroup
    模型编辑器
    sth_fileMonitor
    false
    sth_deprecated
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    InteractiveUI
  @/@OutlineComposite
  sname
  outlineComposite
  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
  svisible
  true
  sdescriptors
  xworker.swt.Widgets/@Composite
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  OutlineComposite
    @/@OutlineComposite/@outlineCompoisteFillLayout
    sname
    outlineCompoisteFillLayout
    stype
    SWT.HORIZONTAL
    sdescriptors
    xworker.swt.Layouts/@FillLayout
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    outlineCompoisteFillLayout
    @/@OutlineComposite/@outlineBrowser
    sname
    outlineBrowser
    slabel
    outlineBrowser
    sdescriptors
    xworker.swt.browser.Browser
    sid
    outlineBrowser
      @/@OutlineComposite/@outlineBrowser/@outlineUtilBrowser
      sname
      outlineUtilBrowser
      sdescriptors
      xworker.swt.browser.Browser/@UtilBrowser
      sid
      outlineUtilBrowser
