^1652184583252
@
sname
HistoryDialog
slabel
HistoryDialog
sdescriptors
xworker.swt.widgets.Display
  @/@shell
  sname
  shell
  stext
  lang:d=历史记录&en=History
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  true
  sMAX
  true
  sBORDER
  false
  sRESIZE
  false
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  300
  sheight
  400
  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
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sid
  shell
    @/@shell/@shellGridLayout
    sname
    shellGridLayout
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    shellGridLayout
    @/@shell/@historyList
    sname
    historyList
    sstyle
    SINGLE
    sH_SCROLL
    true
    sV_SCROLL
    true
    sBORDER
    true
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@List
    sid
    historyList
      @/@shell/@historyList/@historyListGridData
      sname
      historyListGridData
      sstyle
      FILL_BOTH
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.Commons/@GridData
      sid
      historyListGridData
      @/@shell/@historyList/@listeners
      sname
      listeners
      sdescriptors
      xworker.swt.events.Listeners/@listeners
      sid
      listeners
        @/@shell/@historyList/@listeners/@historyListSelection
        sname
        historyListSelection
        stype
        Selection
        sdescriptors
        xworker.swt.events.Listeners/@listeners/@Listener
        sid
        historyListSelection
          @/@shell/@historyList/@listeners/@historyListSelection/@GroovyAction
          sname
          GroovyAction
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Global
          scode
          restoreButton.setEnabled(true);
          sdescriptors
          xworker.lang.actions.Actions/@GroovyAction
          sid
          GroovyAction
    @/@shell/@buttonComposite
    sname
    buttonComposite
    sBORDER
    false
    sH_SCROLL
    false
    sV_SCROLL
    false
    sNO_BACKGROUND
    false
    sNO_FOCUS
    false
    sNO_MERGE_PAINTS
    false
    sNO_REDRAW_RESIZE
    false
    sNO_RADIO_GROUP
    false
    sEMBEDDED
    false
    sDOUBLE_BUFFERED
    false
    sdescriptors
    xworker.swt.Widgets/@Composite
    sid
    buttonComposite
      @/@shell/@buttonComposite/@buttonCompositeGridData
      sname
      buttonCompositeGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      END
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.Commons/@GridData
      sid
      buttonCompositeGridData
      @/@shell/@buttonComposite/@buttonCompositeRowLayout
      sname
      buttonCompositeRowLayout
      sfill
      false
      sjustify
      false
      smarginWidth
      0
      smarginHeight
      0
      smarginLeft
      3
      smarginTop
      3
      smarginRight
      3
      smarginBottom
      3
      spack
      true
      sspacing
      3
      stype
      SWT.HORIZONTAL
      swrap
      true
      sdescriptors
      xworker.swt.Layouts/@RowLayout
      sid
      buttonCompositeRowLayout
      @/@shell/@buttonComposite/@restoreButton
      sname
      restoreButton
      stext
      lang:d=恢复 (&amp;R)&en=Restore(&amp;R)
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      false
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      restoreButton
        @/@shell/@buttonComposite/@restoreButton/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@shell/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton
          sname
          printButtonSeleciton
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          restoreButtonSeleciton
            @/@shell/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import xworker.lang.util.ThingBackupUtil;

def fileName = historyList.getSelection()[0];
for(file in files){
    if(file.getName() == fileName){
        ThingBackupUtil.restore(thing, file.getPath());
        //msg(actionContext);
        actions.doAction("refreshRoot", actionContext);
        shell.dispose();
        return;
    }
}
/*
MessageBox box = new MessageBox(shell, SWT.OK | SWT.CANCEL | SWT.ICON_WARNING);
box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle操作信息", actionContext));
box.setMessage(UtilString.getString("res:res.w_exp:askRestorHistoryThing确实要恢复到历史事物么?", actionContext));
if(SWT.OK == box.open()){
    def root = thing.getRoot();
    def project = root.getMetadata().getProject();
    def factory = root.getMetadata().getThingManager();
    if(project == null || factory == null){
        return;
    }

	String packageName = root.getMetadata().getCategory().getName();
	String fileDirectory =  world.getPath() + (project.isPlugIn() ? "/plug-ins" : "/projects") + "/" + project.getName() + "/" + factory.getName() + "/" +packageName.replaceAll("[.]", "/");		
	String fileName = fileDirectory + "/" + (root.getMetadata().getReserve() == null ?  root.getMetadata().getName() + fileExt : root.getMetadata().getReserve());
	String backFileDirectory = world.getPath() + "/bakup/" + project.getName() + "/" + factory.getName() + "/" + packageName.replaceAll("[.]", "/");
	
    //拷贝旧的数据对象到现有的数据对象	
    File src = new File(backFileDirectory + "/" + historyList.getSelection()[0]);
    File tar = new File(fileName);
    FileUtils.copyFile(src, tar);
    //更新数据对象的日期
    FileUtils.touch(tar);
    
    //刷新当前数据对象
    outlineTree.setSelection(outlineTree.getItems()[0]);
    refreshMenuSelection.handleEvent(null);
}*/
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            false
            sdebugLog
            false
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
              @/@shell/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton/@GroovyAction/@ActionDefined
              sname
              ActionDefined
              sdescriptors
              xworker.lang.actions.Inout/@ActionDefined
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              ActionDefined
                @/@shell/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton/@GroovyAction/@ActionDefined/@msg
                sname
                msg
                sshell
                ognl:explorerContext.shell
                sicon
                ICON_INFORMATION
                sbuttons
                OK
                stitle
                lang:d=重新加载&en=Reload
                smessage
                lang:d=事物模型已重新加载，请先关闭编辑器然后再重新打开。&en=The model has been reloaded. Please close the editor first and reopen it.
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                suseOtherAction
                false
                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
                msg
      @/@shell/@buttonComposite/@closeButton
      sname
      closeButton
      stext
      lang:d=取消（&amp;C）&en=Cancel(&amp;C)
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      closeButton
        @/@shell/@buttonComposite/@closeButton/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@shell/@buttonComposite/@closeButton/@listeners/@closeButtonSelection
          sname
          closeButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          closeButtonSelection
            @/@shell/@buttonComposite/@closeButton/@listeners/@closeButtonSelection/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            scode
            shell.dispose();
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
    @/@shell/@scripts
    sname
    scripts
    sdescriptors
    xworker.swt.Widgets/@actions
    sid
    scripts
      @/@shell/@scripts/@setDataObject
      sname
      setThing
      sisSynchronized
      false
      sthrowException
      false
      suseOtherAction
      false
      svarScope
      Global
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import xworker.lang.util.ThingBackupUtil;

def files = ThingBackupUtil.getBackupFiles(thing);
for(file in files){
    historyList.add(file.getName());
}

_g.put("files", files);
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.groovy.GroovyAction
      sid
      setDataObject
