^1747877304555
@
sname
NewThingDialog
slabel
NewThingDialog
sdescriptors
xworker.swt.widgets.Display
  @/@shell
  sname
  shell
  stext
  lang:d=新建模型&en=New Model
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  false
  sMAX
  true
  sBORDER
  false
  sRESIZE
  true
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  1024
  sheight
  768
  scenterScreen
  true
  spack
  false
  smaximized
  false
  sfullScreen
  false
  sdesign
  true
  sisIde
  false
  sdesignDefaultOpen
  false
  sexitOnDispose
  false
  sH_SCROLL
  false
  sV_SCROLL
  false
  sNO_BACKGROUND
  false
  sNO_MERGE_PAINTS
  false
  sNO_REDRAW_RESIZE
  false
  sNO_RADIO_GROUP
  false
  sEMBEDDED
  false
  sDOUBLE_BUFFERED
  false
  slabel
  shell
  sai_needGenerate
  false
  sai_promptContainsVars
  true
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sid
  shell
    @/@shell/@shellFillLayout
    sname
    shellFillLayout
    stype
    SWT.HORIZONTAL
    sdescriptors
    xworker.swt.Layouts/@FillLayout
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    shellFillLayout
    @/@shell/@mainComposite
    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
    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
    mainComposite
      @/@shell/@mainComposite/@resources
      sname
      resources
      sdescriptors
      xworker.swt.Widgets/@Resource
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      resources
        @/@shell/@mainComposite/@resources/@folderImage
        sname
        folderImage
        stype
        Image
        simageFile
        icons/folder.png
        sdescriptors
        xworker.swt.util.Resource/@Image
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        folderImage
        @/@shell/@mainComposite/@resources/@serachImage
        sname
        serachImage
        stype
        Image
        simageFile
        icons/zoom.png
        sdescriptors
        xworker.swt.util.Resource/@Image
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        serachImage
      @/@shell/@mainComposite/@shellGridLaout
      sname
      shellGridLaout
      snumColumns
      3
      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
      shellGridLaout
      @/@shell/@mainComposite/@dataObjectNameLabel
      sname
      dataObjectNameLabel
      sBORDER
      false
      stype
      HORIZONTAL
      sshadow
      SHADOW_OUT
      salignment
      LEFT
      stext
      lang:d=名字&en=Name
      scapture
      false
      senabled
      true
      sredraw
      true
      spack
      false
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Label
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      dataObjectNameLabel
      @/@shell/@mainComposite/@dataObjectNameText
      sname
      dataObjectNameText
      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
      sdescriptors
      xworker.swt.Widgets/@Text
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      dataObjectNameText
        @/@shell/@mainComposite/@dataObjectNameText/@dataObjectNameTextGridData
        sname
        dataObjectNameTextGridData
        shorizontalIndent
        0
        swidth
        350
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        2
        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
        dataObjectNameTextGridData
      @/@shell/@mainComposite/@deslabel
      sname
      deslabel
      sBORDER
      false
      stype
      HORIZONTAL
      sshadow
      SHADOW_OUT
      salignment
      LEFT
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@newThingDialog/@descriptor
      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
      deslabel
      @/@shell/@mainComposite/@descriptorText
      sname
      descriptorText
      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
      sdescriptors
      xworker.swt.Widgets/@Text
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_noThingRegistViewer
      false
      sth_fileMonitor
      false
      sth_deprecated
      false
      Sdescription
#$@text#$@
<h2>历史</h2>

<p>&nbsp;&nbsp;&nbsp; 最近创建过的模型会按照最后创建日期排序放到这里。</p>
#$@text#$@
      Sen_description
#$@text#$@
<h2>History</h2>

<p>&nbsp;&nbsp;&nbsp; The most recently created models will be placed here sorted by the last creation date.</p>
#$@text#$@
      sth_mark
      false
      sth_registQueryOnlySelf
      false
      snotXmlAttribute
      false
      sjson_isArray
      false
      sid
      descriptorText
        @/@shell/@mainComposite/@descriptorText/@descriptorTextGridData
        sname
        descriptorTextGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        300
        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
        descriptorTextGridData
      @/@shell/@mainComposite/@selectButton
      sname
      selectButton
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@SelectDescritpor
      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
      selectButton
        @/@shell/@mainComposite/@selectButton/@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
          @/@shell/@mainComposite/@selectButton/@listeners/@selectionButtonSelection
          sname
          selectionButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          selectionButtonSelection
            @/@shell/@mainComposite/@selectButton/@listeners/@selectionButtonSelection/@GroovyAction
            sname
            GroovyAction
            sthrowException
            false
            suseOtherAction
            false
            suseOuterJava
            true
            suseInnerJava
            false
            souterClassName
            xworker.ide.worldexplorer.dialogs.NewThingDialog
            smethodName
            selectionButtonSelection
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.xmeta.ActionContext;

import xworker.swt.util.SwtDialog;

def dialogObject = world.getThing("xworker.swt.ide.worldexplorer.swt.tools.ThingSelector/@shell");
def treeItem = event.widget.getParent().getData();

def shell = selectButton.getShell();
ActionContext context = new ActionContext();
context.put("treeItem", treeItem);
context.put("parent", shell);
context.put("text", descriptorText);

def newShell = dialogObject.doAction("create", context);
SwtDialog dialog = new SwtDialog(shell, newShell, context);

def result = dialog.open();
if(result != null){
    descriptorText.setText(result);
}
#$@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
      @/@shell/@mainComposite/@pathLabel
      sname
      pathLabel
      sBORDER
      false
      stype
      HORIZONTAL
      sshadow
      SHADOW_OUT
      salignment
      LEFT
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@newThingDialog/@path
      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
      pathLabel
      @/@shell/@mainComposite/@pathText
      sname
      pathText
      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
      false
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Text
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      pathText
        @/@shell/@mainComposite/@pathText/@descriptorTextGridData
        sname
        descriptorTextGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        300
        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
        descriptorTextGridData
      @/@shell/@mainComposite/@pathSelectButton
      sname
      pathSelectButton
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@Select(_S)
      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
      pathSelectButton
        @/@shell/@mainComposite/@pathSelectButton/@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
          @/@shell/@mainComposite/@pathSelectButton/@listeners/@GroovyAction
          sname
          pathSelectionButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          GroovyAction
            @/@shell/@mainComposite/@pathSelectButton/@listeners/@GroovyAction/@pathSelectionButtonSelection
            sname
            pathSelectionButtonSelection
            sthrowException
            true
            suseOtherAction
            false
            suseOuterJava
            true
            suseInnerJava
            false
            souterClassName
            xworker.ide.worldexplorer.dialogs.NewThingDialog
            smethodName
            pathSelectionButtonSelection
            sdisableGlobalContext
            false
            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
            pathSelectionButtonSelection
      @/@shell/@mainComposite/@mainTabFolder
      sname
      mainTabFolder
      sstyle
      TOP
      sBORDER
      false
      sFLAT
      false
      sCLOSE
      false
      sSINGLE
      false
      sMRUVisible
      false
      ssimple
      false
      sdisposeControlOnItemClosed
      false
      suseItemTopRightControl
      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
      sai_needGenerate
      false
      sai_promptContainsVars
      true
      scapture
      false
      senabled
      true
      sredraw
      true
      spack
      false
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@CTabFolder
      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
      mainTabFolder
        @/@shell/@mainComposite/@mainTabFolder/@modelTabItem
        sname
        modelTabItem
        stext
        lang:d=模型&en=Model
        sCLOSE
        false
        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
        sai_needGenerate
        false
        sai_promptContainsVars
        false
        sid
        modelTabItem
          @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite
          sname
          historyThingsComposite
          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
          historyComposite
            @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie
            sname
            thingsCompostie
            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
            thingsCompostie
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@thingsCompositeGridLayout
              sname
              thingsCompositeGridLayout
              snumColumns
              2
              smakeColumnsEqualWidth
              false
              smarginWidth
              0
              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
              thingsCompositeGridLayout
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historyLabel
              sname
              historyLabel
              sBORDER
              false
              stype
              HORIZONTAL
              sshadow
              SHADOW_OUT
              salignment
              LEFT
              stext
              label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@newThingDialog/@historyLabel
              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
              historyLabel
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historyLabel/@historyLabelGridData
                sname
                historyLabelGridData
                sstyle
                FILL_HORIZONTAL
                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
                historyLabelGridData
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite
              sname
              searchComposite
              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
              searchComposite
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@searchCompositeGridData
                sname
                searchCompositeGridData
                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
                searchCompositeGridData
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@searchCompositeRowLayout
                sname
                searchCompositeRowLayout
                sfill
                false
                sjustify
                false
                smarginWidth
                0
                smarginHeight
                0
                smarginLeft
                0
                smarginTop
                0
                smarginRight
                0
                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
                searchCompositeRowLayout
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachText
                sname
                searchText
                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
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                serachText
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachText/@RowData
                  sname
                  RowData
                  sexclude
                  false
                  swidth
                  100
                  sheight
                  -1
                  sdescriptors
                  xworker.swt.layout.LayoutDatas/@RowData
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  RowData
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachText/@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
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachText/@Listeners/@serachTextDefualtSeleciton
                    sname
                    serachTextDefualtSeleciton
                    stype
                    DefaultSelection
                    sref
                    seaachButtonSelection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    serachTextDefualtSeleciton
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachButton
                sname
                serachButton
                stype
                SWT.PUSH
                sflat
                false
                sborder
                false
                simage
                serachImage
                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
                serachButton
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachButton/@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
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachButton/@Listeners/@seaachButtonSelection
                    sname
                    seaachButtonSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    seaachButtonSelection
                      @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@searchComposite/@serachButton/@Listeners/@seaachButtonSelection/@GroovyAction
                      sname
                      GroovyAction
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.ide.worldexplorer.dialogs.NewThingDialog
                      smethodName
                      seaachButtonSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
def alist = [];
def q = searchText.getText().toLowerCase();
for(child in allThings){
    def name = child.getMetadata().getName().toLowerCase();
    def label = child.getMetadata().getLabel().toLowerCase();
    
    if(q == "" || name.indexOf(q) != -1 || label.indexOf(q) != -1){
        if(child.thingName == "Thing"){
            def t = [:];
            t.name = child.metadata.label;
            t.path = child.getString("descriptor");
            t.lastVisit = "";
            t.visitCount = "";
            t.thingType = child.thingType;
            t.thingPath = child.thingPath;
            alist.add(t);
        }
    }
}

historyTable.removeAll();
historyTable.setData(alist);
for(m in alist){    
    historyTable.updateRow(null, -1, m);
}
#$@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
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm
              sname
              historySashForm
              sstyle
              HORIZONTAL
              sSMOOTH
              false
              sweights
              40,60
              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
              historySashForm
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@categoryTree
                sname
                categoryTree
                sselectStyle
                SINGLE
                sV_SCROLL
                true
                sH_SCROLL
                true
                sCHECK
                false
                sFULL_SELECTION
                false
                sHIDE_SELECTION
                true
                sBORDER
                true
                slineVisible
                false
                smultipleColumns
                false
                sheaderVisible
                false
                ssortIndicator
                true
                smoveableColumns
                true
                sheadImages
                false
                ssubImages
                false
                scheckSelection
                false
                scapture
                false
                sdescriptors
                xworker.swt.Widgets/@Tree
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                categoryTree
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@categoryTree/@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
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@categoryTree/@listeners/@categoryTreeSelection
                    sname
                    categoryTreeSelection
                    stype
                    Selection
                    sdescriptors
                    xworker.swt.events.Listeners/@listeners/@Listener
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    categoryTreeSelection
                      @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@categoryTree/@listeners/@categoryTreeSelection/@GroovyAction
                      sname
                      GroovyAction
                      sthrowException
                      true
                      suseOtherAction
                      false
                      suseOuterJava
                      true
                      suseInnerJava
                      false
                      souterClassName
                      xworker.ide.worldexplorer.dialogs.NewThingDialog
                      smethodName
                      categoryTreeSelection
                      sdisableGlobalContext
                      false
                      Scode
#$@text#$@
def item = categoryTree.getSelection()[0];

if(item.getData() == null){
    //历史记录
    actions.doAction("initHistory", actionContext);
}else{
    //历史记录
    actions.doAction("initCategoryThing", actionContext);
}
#$@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
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm
                sname
                descriptorSashForm
                sstyle
                VERTICAL
                sSMOOTH
                false
                sweights
                55,45
                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
                descriptorSashForm
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable
                  sname
                  historyTable
                  sselectStyle
                  SINGLE
                  sV_SCROLL
                  true
                  sH_SCROLL
                  true
                  sCHECK
                  false
                  sFULL_SELECTION
                  true
                  sHIDE_SELECTION
                  false
                  sBORDER
                  true
                  slineVisible
                  true
                  smultipleColumns
                  true
                  sheaderVisible
                  true
                  ssortIndicator
                  true
                  smoveableColumns
                  true
                  sheadImages
                  false
                  ssubImages
                  false
                  sVIRTUAL
                  false
                  scolumnNames
                  ["name", "lastVisit", "visitCount"] as String[]
                  sdescriptors
                  xworker.swt.Widgets/@DataTable
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  historyTable
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@nameItem
                    sname
                    nameItem
                    stext
                    res:res.w_exp:name:名称
                    swidth
                    400
                    sdescriptors
                    xworker.swt.xworker.DataTable/@TableColumn
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    nameItem
                      @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@nameItem/@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
                        @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@nameItem/@listeners/@nameItemSelection
                        sname
                        nameItemSelection
                        stype
                        Selection
                        sdescriptors
                        xworker.swt.events.Listeners/@listeners/@Listener
                        sinheritDescription
                        false
                        sth_createIndex
                        false
                        sth_registMyChilds
                        false
                        sth_registDisabled
                        false
                        sth_mark
                        false
                        sid
                        nameItemSelection
                          @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@nameItem/@listeners/@nameItemSelection/@GroovyAction
                          sname
                          GroovyAction
                          sthrowException
                          false
                          suseOtherAction
                          false
                          suseOuterJava
                          true
                          suseInnerJava
                          false
                          souterClassName
                          xworker.ide.worldexplorer.dialogs.NewThingDialog
                          smethodName
                          nameItemSelection
                          sdisableGlobalContext
                          false
                          Scode
#$@text#$@
import org.eclipse.swt.SWT;

def sortColumn = historyTable.getSortColumn();
def currentColumn = event.widget;
int dir = historyTable.getSortDirection();
if (sortColumn == currentColumn) {
	dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
} else {
	historyTable.setSortColumn(currentColumn);
	switch(currentColumn){
	    case nameItem:
	    case lastVisitItem:
	    case visitCountItem:
	        dir = SWT.DOWN;
	        break;
	    default:
	        dir = SWT.UP;
	        break;
	}
}

historyTable.setSortDirection(dir);
def alist = historyTable.getData();
if(currentColumn == nameItem){
    if(dir == SWT.DOWN){
        alist = alist.sort{l,r -> return r.name <=> l.name};
    }else{
        alist = alist.sort{l,r -> return l.name <=> r.name};
    }
}
/*
if(currentColumn == lastVisitItem){
    if(dir == SWT.DOWN){
        alist = alist.sort{l,r -> return r.lastVisit <=> l.lastVisit};
    }else{
        alist = alist.sort{l,r -> return l.lastVisit <=> r.lastVisit};
    }
}
if(currentColumn == visitCountItem){
    if(dir == SWT.DOWN){
        alist = alist.sort{l,r -> return r.visitCount <=> l.visitCount};
    }else{
        alist = alist.sort{l,r -> return l.visitCount <=> r.visitCount};
    }
}
*/
historyTable.removeAll();
for(m in alist){
    historyTable.updateRow(null, -1, m);
}
#$@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
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@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
                      @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@listeners/@historyTableSelection
                      sname
                      historyTableSelection
                      stype
                      Selection
                      sdescriptors
                      xworker.swt.events.Listeners/@listeners/@Listener
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      historyTableSelection
                        @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@historyTable/@listeners/@historyTableSelection/@GroovyAction
                        sname
                        GroovyAction
                        sthrowException
                        false
                        suseOtherAction
                        false
                        suseOuterJava
                        true
                        suseInnerJava
                        false
                        souterClassName
                        xworker.ide.worldexplorer.dialogs.NewThingDialog
                        smethodName
                        historyTableSelection
                        sdisableGlobalContext
                        false
                        Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;

def itemData = historyTable.getSelection()[0].getData();

def path = itemData.path;
def docPath = path;
def pathObj = world.getThing(path);

if(itemData.thingType == "template" && itemData.thingPath != null){
    okButton.setText(world.getThing("xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@newThingDialog/@useTemplateButton").metadata.label);
    okButton.setData("action", "useTemplate");    
    docPath = itemData.thingPath;
}else{
    //默认创建事物
    okButton.setText(world.getThing("xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@okButton").metadata.label);
    okButton.setData("action", "createThing");
    cancelButton.setText(world.getThing("xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@cancelButton").metadata.label);
    cancelButton.setData("action", "dispose");
}

if(path != null){
    descriptorText.setText(path);
    //def cfg = world.getThing("xworker.ide.config.globalConfig/@html");
    //String html = cfg.getString("head") + pathObj.getString("description") + cfg.getString("bottom"); 
    
    //def globalConfig = world.getThing("_local.xworker.config.GlobalConfig");
    //def webUrl = globalConfig.getString("webUrl");
    def webUrl = XWorkerUtils.getThingDescUrl(docPath);
    historyBorwser.setUrl(webUrl);// + "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + docPath);
    /*String html = pathObj.getString("description");
    if(html == null){
        html = "";
    }
    historyBorwser.setText(html);*/
}else{
    descriptorText.setText("");
    historyBorwser.setText("");
}
#$@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
                  @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@browserComposite
                  sname
                  browserComposite
                  sBORDER
                  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
                  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
                  browserComposite
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@browserComposite/@historyBorwser
                    sname
                    historyBorwser
                    sWEBKIT
                    false
                    sdescriptors
                    xworker.swt.Widgets/@Browser
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    historyBorwser
                      @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@browserComposite/@historyBorwser/@historyBrowserUtil
                      sname
                      historyBrowserUtil
                      sdescriptors
                      xworker.swt.browser.Browser/@UtilBrowser
                      sinheritDescription
                      false
                      sth_createIndex
                      false
                      sth_registMyChilds
                      false
                      sth_registDisabled
                      false
                      sth_mark
                      false
                      sid
                      historyBrowserUtil
                    @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@descriptorSashForm/@browserComposite/@browserCompositeFillLayout
                    sname
                    browserCompositeFillLayout
                    stype
                    SWT.HORIZONTAL
                    sdescriptors
                    xworker.swt.Layouts/@FillLayout
                    sinheritDescription
                    false
                    sth_createIndex
                    false
                    sth_registMyChilds
                    false
                    sth_registDisabled
                    false
                    sth_mark
                    false
                    sid
                    browserCompositeFillLayout
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@thingsCompostie/@historySashForm/@historySashFormgridData
                sname
                historySashFormgridData
                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
                historySashFormgridData
            @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite
            sname
            templateComposite
            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
            templateComposite
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite/@thingsCompositeGridLayout
              sname
              thingsCompositeGridLayout
              snumColumns
              1
              smakeColumnsEqualWidth
              false
              smarginWidth
              0
              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
              thingsCompositeGridLayout
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite/@historyLabel
              sname
              historyLabel
              sBORDER
              false
              stype
              HORIZONTAL
              sshadow
              SHADOW_OUT
              salignment
              LEFT
              stext
              编辑模板数据：
              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
              historyLabel
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite/@historyLabel/@historyLabelGridData
                sname
                historyLabelGridData
                sstyle
                FILL_HORIZONTAL
                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
                historyLabelGridData
              @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite/@templateComp
              sname
              templateComp
              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
              templateComp
                @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@templateComposite/@templateComp/@tempalteCompGridData
                sname
                tempalteCompGridData
                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
                tempalteCompGridData
            @/@shell/@mainComposite/@mainTabFolder/@modelTabItem/@historyComposite/@historyCompositeStackLayotu
            sname
            historyCompositeStackLayotu
            stopControl
            templateComposite
            sdescriptors
            xworker.swt.Layouts/@StackLayout
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            historyCompositeStackLayotu
        @/@shell/@mainComposite/@mainTabFolder/@aiTabItem
        sname
        aiTabItem
        stext
        lang:d=AI生成&en=AI Generate
        sCLOSE
        false
        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
        sai_needGenerate
        false
        sai_promptContainsVars
        false
        sid
        aiTabItem
          @/@shell/@mainComposite/@mainTabFolder/@aiTabItem/@aiGenerateSashForm
          sname
          aiGenerateSashForm
          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
          sai_needGenerate
          false
          sai_promptContainsVars
          true
          scapture
          false
          senabled
          true
          sredraw
          true
          spack
          false
          svisible
          true
          sdescriptors
          xworker.swt.Widgets/@SashForm
          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
          aiGenerateSashForm
            @/@shell/@mainComposite/@mainTabFolder/@aiTabItem/@aiGenerateSashForm/@aiGenerateThingRegister
            sname
            aiGenerateThingRegister
            sthing
            xworker.lang.ai.agent.AIGenerateThingIndex
            sregistType
            child
            sparent
            false
            snoDescriptor
            false
            ssearchByKeywords
            true
            sshowContent
            false
            scontentDisplayType
            TabFolder
            sforceUseDefaultOpenMethod
            false
            sshowDescBrowser
            false
            sdescBrowserRight
            false
            sautoLoad
            false
            scache
            true
            scheck
            false
            sdisableRegistMyChilds
            false
            sdescritporForNewThing
            xworker.lang.content.QuickContent
            sdescriptorForNewThing
            xworker.lang.ai.agent.AIGenerateThing
            sdescritporChilds
            false
            sdescriptors
            xworker.swt.Widgets/@ThingRegistSelector
            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_promptContainsVars
            false
            sid
            aiGenerateThingRegister
              @/@shell/@mainComposite/@mainTabFolder/@aiTabItem/@aiGenerateSashForm/@aiGenerateThingRegister/@actions
              sname
              actions
              sdescriptors
              xworker.swt.xworker.ThingRegistSelector/@actions1
              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_promptContainsVars
              false
              sid
              actions
                @/@shell/@mainComposite/@mainTabFolder/@aiTabItem/@aiGenerateSashForm/@aiGenerateThingRegister/@actions/@selected
                sname
                selected
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                svarScope
                Local
                sdisableGlobalContext
                false
                Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
import xworker.swt.util.SwtUtils;

if (thing != null) {
    def example = thing.doAction("getExample", actionContext);
    if (example == null) {
        example = thing;
    }
    
    if (example.getActionThing("httpDo") != null) {
        aiExampleBrowser.setUrl(XWorkerUtils.getWebControlUrl(example));
    } else {
        SwtUtils.setThingDesc(example, aiExampleBrowser);
    }
    
    def descriptor = thing.doAction("getThing", actionContext);
    if (descriptor != null) {
        descriptorText.setText(descriptor.getMetadata().getPath());
    }
    actionContext.g().put("aiThing", descriptor);
    
    def aiAssistant = thing.doAction("getAssistant", actionContext);
    actionContext.g().put("aiAssistant", aiAssistant);
}
#$@text#$@
                sai_needGenerate
                false
                sai_rootThingXml
                true
                sai_promptContainsVars
                true
                sinterpretationType
                Action
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdebugLog
                false
                sdescriptors
                xworker.groovy.GroovyAction
                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
                selected
            @/@shell/@mainComposite/@mainTabFolder/@aiTabItem/@aiGenerateSashForm/@aiExampleBrowser
            sname
            aiExampleBrowser
            sWEBKIT
            false
            sEDGE
            true
            sjavascriptEnabled
            true
            sdescriptors
            xworker.swt.Widgets/@Browser
            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_promptContainsVars
            false
            sid
            aiExampleBrowser
        @/@shell/@mainComposite/@mainTabFolder/@GridData
        sname
        GridData
        sstyle
        FILL_BOTH
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        BEGINNING
        sverticalAlignment
        CENTER
        shorizontalSpan
        3
        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
        sai_needGenerate
        false
        sai_promptContainsVars
        false
        sid
        GridData
      @/@shell/@mainComposite/@buttonCell
      sname
      buttonCell
      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
      buttonCell
        @/@shell/@mainComposite/@buttonCell/@buttonCellGridData
        sname
        buttonCellGridData
        sstyle
        FILL_HORIZONTAL
        shorizontalIndent
        0
        swidth
        -1
        sheight
        -1
        shorizontalAlignment
        END
        sverticalAlignment
        CENTER
        shorizontalSpan
        3
        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
        buttonCellGridData
        @/@shell/@mainComposite/@buttonCell/@buttonCellRowLayout
        sname
        buttonCellRowLayout
        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
        buttonCellRowLayout
        @/@shell/@mainComposite/@buttonCell/@okButton
        sname
        okButton
        stext
        lang:d=确定（&amp;O）&en=Ok(&amp;O)
        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
        okButton
          @/@shell/@mainComposite/@buttonCell/@okButton/@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
            @/@shell/@mainComposite/@buttonCell/@okButton/@listeners/@okButtonSelection
            sname
            okButtonSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            okButtonSelection
              @/@shell/@mainComposite/@buttonCell/@okButton/@listeners/@okButtonSelection/@GroovyAction
              sname
              GroovyAction
              sthrowException
              true
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.ide.worldexplorer.dialogs.NewThingDialog
              smethodName
              okButtonSelection
              sdisableGlobalContext
              false
              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
                @/@shell/@mainComposite/@buttonCell/@okButton/@listeners/@okButtonSelection/@GroovyAction/@ActionDefined
                sname
                ActionDefined
                sdescriptors
                xworker.lang.actions.Inout/@ActionDefined
                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
                ActionDefined
                  @/@shell/@mainComposite/@buttonCell/@okButton/@listeners/@okButtonSelection/@GroovyAction/@ActionDefined/@nameError
                  sname
                  nameError
                  sicon
                  ICON_ERROR
                  sbuttons
                  OK
                  stitle
                  lang:d=创建模型&en=Create Model
                  smessage
                  lang:d=模型名字不能为空，或包含'.'和':'等符号。&en=The model name cannot be empty or contain symbols such as '.' and ':'.
                  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.swt.actions.MessageBoxActions/@MessageBox
                  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
                  nameError
          @/@shell/@mainComposite/@buttonCell/@okButton/@RowData
          sname
          RowData
          sexclude
          false
          swidth
          120
          sheight
          -1
          sdescriptors
          xworker.swt.layout.LayoutDatas/@RowData
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          RowData
        @/@shell/@mainComposite/@buttonCell/@cancelButton
        sname
        cancelButton
        stext
        lang:d=取消（&amp;C）&en=Cancel(&amp;C)
        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
        cancelButton
          @/@shell/@mainComposite/@buttonCell/@cancelButton/@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
            @/@shell/@mainComposite/@buttonCell/@cancelButton/@listeners/@cancelButtonSelection
            sname
            cancelButtonSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            cancelButtonSelection
              @/@shell/@mainComposite/@buttonCell/@cancelButton/@listeners/@cancelButtonSelection/@GroovyAction
              sname
              GroovyAction
              sthrowException
              false
              suseOtherAction
              false
              suseOuterJava
              true
              suseInnerJava
              false
              souterClassName
              xworker.ide.worldexplorer.dialogs.NewThingDialog
              smethodName
              cancelButtonSelection
              sdisableGlobalContext
              false
              Scode
#$@text#$@
def action = cancelButton.getData("action");
if(action != null){
    return actions.doAction(action, actionContext);
}

shell.dispose();

//回调，如果存在
if(actionContext.get("callback") != null){
    callback.call("thing", 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
          @/@shell/@mainComposite/@buttonCell/@cancelButton/@RowData
          sname
          RowData
          sexclude
          false
          swidth
          120
          sheight
          -1
          sdescriptors
          xworker.swt.layout.LayoutDatas/@RowData
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          RowData
      @/@shell/@mainComposite/@Models
      sname
      Models
      sdescriptors
      xworker.swt.Widgets/@Models
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      Models
        @/@shell/@mainComposite/@Models/@model
        sname
        model
        sdataType
        Map
        svalidate
        true
        sfocusColor
        "#E8FAFF"
        LvalidateOnBlur
        false
        LallowDecimals
        false
        LallowNegative
        false
        sdescriptors
        xworker.swt.model.Models/@Model
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        model
          @/@shell/@mainComposite/@Models/@model/@name
          sname
          name
          sswtControl
          dataObjectNameText
          spropertyName
          name
          svalidate
          true
          sfocusColor
          "#E8FAFF"
          LvalidateOnBlur
          false
          LallowDecimals
          false
          LallowNegative
          false
          sdescriptors
          xworker.swt.model.Model/@Model
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          name
          @/@shell/@mainComposite/@Models/@model/@descriptors
          sname
          descriptors
          sswtControl
          descriptorText
          spropertyName
          descriptors
          svalidate
          true
          sfocusColor
          "#E8FAFF"
          LvalidateOnBlur
          false
          LallowDecimals
          false
          LallowNegative
          false
          sdescriptors
          xworker.swt.model.Model/@Model
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          descriptors
          @/@shell/@mainComposite/@Models/@model/@path
          sname
          path
          sswtControl
          pathText
          svalidate
          true
          sfocusColor
          "#E8FAFF"
          LvalidateOnBlur
          false
          LallowDecimals
          false
          LallowNegative
          false
          sdescriptors
          xworker.swt.model.Model/@Model
          sinheritDescription
          false
          sth_createIndex
          false
          sth_registMyChilds
          false
          sth_registDisabled
          false
          sth_mark
          false
          sid
          path
      @/@shell/@mainComposite/@actions
      sname
      actions
      sdescriptors
      xworker.swt.Widgets/@actions
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      actions
        @/@shell/@mainComposite/@actions/@initHistory
        sname
        initHistory
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        initHistory
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.xmeta.Thing;

historyTable.removeAll();

def memory = world.getThing("_local.xworker.worldExplorer.CreateThingMemory");
if(memory == null){
    memory = new Thing("xworker.ide.worldexplorer.swt.memory.CreateThingMemory/@struct");
    if(menory == null){
        //没有XWorker
        return;
    }
    
    memory.saveAs("_local", "_local.xworker.worldExplorer.CreateThingMemory");

    memory = world.getThing("_local.xworker.worldExplorer.CreateThingMemory");
}
def ms = memory.childs;

def alist = [];
for(m in ms){
    alist.add(m);
}

alist = alist.sort{ l,r -> return r.lastVisit <=> l.lastVisit};
historyTable.setData(alist);
for(m in alist){    
    historyTable.updateRow(null, -1, m);
}
#$@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
        initHistory
        @/@shell/@mainComposite/@actions/@initCategoryThing
        sname
        initCategoryThing
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        initCategoryThing
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;
historyTable.removeAll();

def item = categoryTree.getSelection()[0];

def webUrl = XWorkerUtils.getWebUrl();
//def globalConfig = world.getThing("_local.xworker.config.GlobalConfig");
//def webUrl = globalConfig.getString("webUrl");
historyBorwser.setUrl(webUrl + "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + item.getData().metadata.path);
    
def alist = [];
for(child in item.getData().getAllChilds()){
    if(child.thingName == "Thing"){
        def t = [:];
        t.name = child.metadata.label;
        t.path = child.getString("descriptor");
        t.lastVisit = "";
        t.visitCount = "";
        t.thingType = child.thingType;
        t.thingPath = child.thingPath;
        alist.add(t);
    }
}

historyTable.setData(alist);
for(m in alist){    
    historyTable.updateRow(null, -1, m);
}
#$@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
        initCategoryThing
        @/@shell/@mainComposite/@actions/@userTemplate
        sname
        useTemplate
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        useTemplate
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.xmeta.Thing;
import org.eclipse.swt.widgets.Control;

//编辑模板数据
def itemData = historyTable.getSelection()[0].getData();
def templateThing = world.getThing(itemData.thingPath);
def descriptor = templateThing.get("InputThing@0");
templateThingData = new Thing(descriptor.metadata.path);
editorActions.doAction("setThing", actionContext, ["thing":templateThingData]);

okButton.setText("确定");
okButton.setData("action", "applyTemplate");
cancelButton.setText("取消模板");
cancelButton.setData("action", "cancelUseTemplate");
    
//显示模板
historyCompositeStackLayotu.topControl =templateComposite;
historyThingsComposite.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
        userTemplate
        @/@shell/@mainComposite/@actions/@cancelUseTemplate
        sname
        cancelUseTemplate
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        cancelUseTemplate
        sdisableGlobalContext
        false
        Scode
#$@text#$@
//显示模板
historyCompositeStackLayotu.topControl = thingsCompostie;
historyThingsComposite.layout();

okButton.setText("确定");
okButton.setData("action", "createThing");
cancelButton.setText("取消");
cancelButton.setData("action", "dispose");
#$@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
        cancelUseTemplate
        @/@shell/@mainComposite/@actions/@applyTemplate
        sname
        applyTemplate
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        applyTemplate
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.Category;
import org.xmeta.ThingManager;
import org.xmeta.Project;

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

import org.xmeta.util.UtilString;

//校验数据输入
if(!model.doAction("validate", actionContext)) return;

def category = world.get(pathText.getText());
if(category != null && (category instanceof Category || category instanceof ThingManager)){
     if(category instanceof ThingManager){
         category = category.getCategory("");
     }
}else{
    MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
    box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle|操作信息", actionContext));
    box.setMessage(UtilString.getString("请选择正确的路径！", actionContext));
    box.open();
    return;
}

def values = model.doAction("getValue", actionContext);
//判断数据对象是否存在
if(category.getThing(values.name) != null){
    MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
    box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle|操作信息", actionContext));
    box.setMessage(UtilString.getString("res:res.w_exp:alertThingExists事物已经已经存在！", actionContext));
    box.open();
    return;
}else{
    //创建新的对象    
    Thing object = new Thing(values.name, values.name, values.descriptors, false);
    object.metadata.setCategory(category);
    object.metadata.initPath();
    category.getThingManager().save(object);
    
    Thing thing = world.getThing(object.metadata.path);
    if(actionContext.get("treeItem") != null){
        //如果是从事物浏览器创建的，会带一个treeItem过来
        treeItem.getData().refresh();
    }
        
    def itemData = historyTable.getSelection()[0].getData();
    def templateThing = world.getThing(itemData.thingPath);
    def data = editorActions.doAction("getThing");
    def proccessedThing = templateThing.doAction("process", actionContext, ["data":data]);
    if(proccessedThing != null){
        thing.paste(proccessedThing);
        thing.save();
    }
    
    //explorerActions.doAction("openPackageViewer", ["index":treeItem.getData(), "refresh":true]);
    //开打事物
    explorerActions.doAction("openThing", ["thing":thing]);
    
    //保存对描述的历史记录
    def descPath = values.descriptors;
    def descObj = world.getThing(descPath);
    if(descObj == null) return;
    
    def memory = world.getThing("_local.xworker.worldExplorer.CreateThingMemory/@memorys");
    def have = false;
    for(dataObj in memory.childs){
        if(dataObj.path == descPath){
            dataObj.name = descObj.metadata.name;
            dataObj.lastVisit = new Date();
            dataObj.visitCount ++;
            dataObj.save();
            have = true;
        }
    }
    
    if(!have){
        def vd = new Thing(descObj.metadata.name, descObj.metadata.name, "_local.xworker.worldExplorer.CreateThingMemory/@struct", false);        
        vd.path = descPath;
        vd.lastVisit = new Date();
        vd.visitCount = 1;
        memory.addChild(vd);
        memory.save();
    }

    shell.dispose();
}
#$@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
        applyTemplate
          @/@shell/@mainComposite/@actions/@applyTemplate/@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
            @/@shell/@mainComposite/@actions/@applyTemplate/@ActionDefined/@pathMsg
            sname
            pathMsg
            sshell
            var:shell
            sicon
            ICON_WARNING
            sbuttons
            OK
            stitle
            lang:d=应用模板&en=Apply  Template
            smessage
            lang:d=请选择正确的路径！&en=Please select corrected 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/@MessageBox
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            pathMsg
            @/@shell/@mainComposite/@actions/@applyTemplate/@ActionDefined/@pathMsg1
            sname
            existsMsg
            sshell
            var:shell
            sicon
            ICON_WARNING
            sbuttons
            OK
            stitle
            lang:d=应用模板&en=Apply  Template
            smessage
            lang:d=事物已经已经存在！&en=Thing already exists!
            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
            pathMsg1
        @/@shell/@mainComposite/@actions/@createThing
        sname
        createThing
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        createThing
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.xmeta.Thing;
import org.xmeta.Category;
import org.xmeta.ThingManager;
import org.xmeta.cache.ThingCache;

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

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

//校验数据输入
if(!model.doAction("validate", actionContext)) return;

if(actionContext.get("index") == null){
    //RWT下confirmNoPath无效
    if(SwtUtils.isRWT() || "OK" == confirmNoPath(actionContext)){        
        def values = model.doAction("getValue", actionContext);
        Thing thing = new Thing(values.name, values.name, values.descriptors, true);
        XWorkerUtils.ideOpenThing(thing);
        
        if(actionContext.get("shell") != null){
            shell.dispose();    
            actionContext.getScope(0).put("result", thing);
        }
        return thing;
    }
    return;
}
//def index = treeItem.getData();
def category = null;
if(index instanceof Category){
    category = index;
}else{
    //默认是Index
    if(index.type == "thingManager"){
        category = index.getIndexObject().getCategory(null);;
    }else{
        category = index.getIndexObject();
    }
}

def values = model.doAction("getValue", actionContext);
//判断数据对象是否存在
if(category.getThing(values.name) != null){
    //MessageBox box = new MessageBox(okButton.getShell(), SWT.OK | SWT.ICON_ERROR);
    //box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle:操作信息", actionContext));
    //box.setMessage(UtilString.getString("res:res.w_exp:alertThingExists:事物已经已经存在！", actionContext));
    //box.open();
    thingAlreadyExists(actionContext);
    return;
}else if(values.name == null || values.name.trim() == "" || values.name.indexOf(".") != -1 || values.name.indexOf(":") != -1){
    //MessageBox box = new MessageBox(okButton.getShell(), SWT.OK | SWT.ICON_ERROR);
    //box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle|操作信息", actionContext));
    //box.setMessage(UtilString.getString("请输入正确的事物名！事物名不能为空和包含符号'.'和':'。", actionContext));
    //box.open();
    //nameNotLegal(actionContext);
    return;
}else{
    //创建新的对象    
    if(values.descriptors == null || values.descriptors == ""){
        values.descriptors = "xworker.lang.MetaDescriptor3";
    }
    Thing object = new Thing(values.name, values.name, values.descriptors, false);
    object.metadata.setCategory(category);
    object.metadata.initPath();
    object.metadata.setCoderType(values.codecType);
    
    //初始化事物
    if(actionContext.get("thingInitValues") != null){
        object.putAll(thingInitValues);
    }
    if(actionContext.get("thingInitThing") != null){
        object.paste(thingInitThing);
    }
    category.getThingManager().save(object);
    
    //放入缓存
    ThingCache.put(object.metadata.path, object);
            
    if(actionContext.get("treeItem") != null){
        //如果是从事物浏览器创建的，会带一个treeItem过来
        treeItem.getData().refresh();
    }
        
    //explorerActions.doAction("openPackageViewer", ["index":treeItem.getData(), "refresh":true]);
    //开打事物
    Thing thing = object;//world.getThing(object.metadata.path);
    //explorerActions.doAction("openThing", ["thing":thing]);
    
    //保存对描述的历史记录
    def descPath = values.descriptors;
    def descObj = world.getThing(descPath);
    if(descObj != null && "thingTab" == descObj.getString("createOpenAction")){
        XWorkerUtils.ideOpenThingTab(thing);
    }else{
        XWorkerUtils.ideOpenThing(thing);
    }    
    
    if(descObj == null) return;
    
    def memory = world.getThing("_local.xworker.worldExplorer.CreateThingMemory");
    if(memory == null){
         memory = new Thing();
         memory.saveAs("_local", "_local.xworker.worldExplorer.CreateThingMemory");
    }
    def have = false;
    for(dataObj in memory.childs){
        if(dataObj.path == descPath){
            dataObj.name = descObj.metadata.name;
            dataObj.lastVisit = new Date();
            dataObj.visitCount ++;
            dataObj.save();
            have = true;
        }
    }
    
    if(!have){
        def vd = new Thing(descObj.metadata.name, descObj.metadata.name, "xworker.ide.worldexplorer.swt.memory.CreateThingMemory/@struct", false);        
        vd.path = descPath;
        vd.lastVisit = new Date();
        vd.visitCount = 1;
        memory.addChild(vd);
        memory.save();
    }

    if(actionContext.get("shell") != null){
        shell.dispose();
        actionContext.getScope(0).put("result", thing);
    }

    if(actionContext.get("callback") != null){
        callback.call("thing", thing);
    }
    return 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
        createThing
          @/@shell/@mainComposite/@actions/@createThing/@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
            @/@shell/@mainComposite/@actions/@createThing/@ActionDefined/@confirmNoPath
            sname
            confirmNoPath
            sshell
            ognl:okButton.getShell()
            sicon
            ICON_QUESTION
            sbuttons
            OK | CANCEL
            stitle
            lang:d=创建模型&en=Create New Thing
            smessage
            lang:d=未设置路径，要创建一个内存中的临时模型吗？&en=The path is not set. Do you want to create a temporary model in memory?
            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
            confirmNoPath
            @/@shell/@mainComposite/@actions/@createThing/@ActionDefined/@thingAlreadyExists
            sname
            thingAlreadyExists
            sshell
            ognl:okButton.getShell()
            sicon
            ICON_WARNING
            sbuttons
            OK
            stitle
            lang:d=创建模型&en=Create New Thing
            smessage
            lang:d=事物模型已经存在！&en=Thing already exists!
            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
            thingAlreadyExists
            @/@shell/@mainComposite/@actions/@createThing/@ActionDefined/@nameNotLegal
            sname
            nameNotLegal
            sshell
            ongl:okButton.getShell()
            sicon
            ICON_ERROR
            sbuttons
            OK
            stitle
            lang:d=创建模型&en=Create New Thing
            smessage
            lang:d=事物名包含非法字符，不能包含特殊符号。&en=The name of the object contains illegal characters and cannot contain special symbols.
            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
            nameNotLegal
        @/@shell/@mainComposite/@actions/@dispose
        sname
        dispose
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        dispose
        sdisableGlobalContext
        false
        Scode
#$@text#$@
if(actionContext.get("shell") != null){
    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
        dispose
      @/@shell/@mainComposite/@interactiveUI
      sname
      interactiveUI
      slabel
      新建模型
      scommandIndex
      xworker.swt.ide.worldexplorer.swt.command.indexs.CreateThingDialogIndex
      spriority
      0
      sen_label
      Create Model
      sen_group
      Create Model
      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
      sid
      interactiveUI
      @/@shell/@mainComposite/@init
      sname
      init
      sdescriptors
      xworker.swt.Widgets/@RunAction
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      init
        @/@shell/@mainComposite/@init/@InitCode
        sname
        InitCode
        sthrowException
        true
        suseOtherAction
        false
        suseOuterJava
        true
        suseInnerJava
        false
        souterClassName
        xworker.ide.worldexplorer.dialogs.NewThingDialog
        smethodName
        initCode
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TreeItem;
import xworker.lang.util.ThingUtils;
import xworker.lang.util.XWorkerUtils;

//目录
if(actionContext.get("categoryPath") != null){
    pathText.setText(categoryPath);
}

if(XWorkerUtils.hasXWorker()){
    //历史记录
    actions.doAction("initHistory", actionContext);
    
    //目录树
    def item = new TreeItem(categoryTree, SWT.NONE);
    item.setText(world.getThing("xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@newThingDialog/@historyRecord").metadata.label);
    item.setImage(folderImage);
}       
def allThings = [];
actionContext.getScope(0).put("allThings", allThings);
def coreThings = world.getThing("xworker.ide.config.Things");
if(coreThings != null){
    initThings(categoryTree, coreThings, allThings);
}

def registorThing = world.getThing("xworker.lang.Things");
def thingsList = ThingUtils.searchRegistThings(registorThing, "child", [], actionContext);
for(things in thingsList){
    if(things.getMetadata().getPath() != "xworker.ide.config.Things"){
        initThings(categoryTree, things, allThings);
    }
}

/*
for(thingManager in world.getThingManagers()){
    def rootCategory = thingManager.getCategory(null);
    for(lv1Category in rootCategory.getCategorys()){
        for(lv2Category in lv1Category.getCategorys()){
            String project = lv1Category.getSimpleName() + "." + lv2Category.getSimpleName();
            def things = world.getThing(project + ".config.Things");
            if(things != null){
                 if(project == "xworker.ide"){                    
                 }else{
                     initThings(categoryTree, things, allThings);
                 }
            }
        }
    }
}
*/
for(thingCoder in world.getThingCoders()){
    for(type in thingCoder.getCodeTypes()){
        codecTypeCombo.add(type);
    }
}
codecTypeCombo.select(0);
/*
for(project in world.getProjects()){
    for(thingManager in project.getThingManagers()){
        def things = world.getThing(project.getName() + ":" + thingManager.getName() + ":config.Things");
        if(things != null){
             if(project.name == "xworker" && thingManager.name == "core"){                    
             }else{
                 initThings(categoryTree, things);
             }
        }
    }
}
*/

//为解决模板bug，事物定义是先显示模板，正常启动后切换到事物选择
historyCompositeStackLayotu.topControl = thingsCompostie;
historyThingsComposite.layout();

def initThings(treeItem, things, allThings){
    for(child in things.getAllChilds()){
        def thingName = child.getThingName();
        if(thingName == "Category"){
            def item = new TreeItem(treeItem, SWT.NONE);
            item.setText(child.metadata.label);
            item.setData(child);
            item.setImage(folderImage);
            
            initThings(item, child, allThings);
        }else if(thingName == "Thing"){
            allThings.add(child);
        }
    }
    
    if(treeItem instanceof TreeItem){
        //treeItem.setExpanded(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
        InitCode
