^1640682297842
@
sname
OpenDataObjectDialog
slabel
OpenDataObjectDialog
sdescriptors
xworker.swt.widgets.Display
  @/@shell
  sname
  shell
  stext
  lang:d=打开&en=Open
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  false
  sMAX
  false
  sBORDER
  false
  sRESIZE
  false
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  -1
  sheight
  -1
  scenterScreen
  true
  spack
  true
  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
    snumColumns
    2
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    shellGridLayout
    @/@shell/@findLabel
    sname
    pathLabel
    sBORDER
    false
    stype
    HORIZONTAL
    sshadow
    SHADOW_OUT
    salignment
    LEFT
    stext
    res:res.w_exp:pathLabel:路径：
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Label
    sid
    findLabel
    @/@shell/@findText
    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
    sdescriptors
    xworker.swt.Widgets/@Text
    sid
    findText
      @/@shell/@findText/@findTextGridData
      sname
      findTextGridData
      sstyle
      GRAB_HORIZONTAL
      shorizontalIndent
      0
      swidth
      300
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.Commons/@GridData
      sid
      findTextGridData
      @/@shell/@findText/@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/@findText/@Listeners/@pathTextDefaultSelection
        sname
        pathTextDefaultSelection
        stype
        DefaultSelection
        sref
        openButtonSelection
        sdescriptors
        xworker.swt.events.Listeners/@listeners/@Listener
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        pathTextDefaultSelection
    @/@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
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    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
      2
      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/@replaceButton
      sname
      openButton
      stext
      res:res.w_exp:openButton:打开（&O）
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      replaceButton
        @/@shell/@buttonComposite/@replaceButton/@listeners
        sname
        listeners
        sdescriptors
        xworker.swt.events.Listeners/@listeners
        sid
        listeners
          @/@shell/@buttonComposite/@replaceButton/@listeners/@replaceButtonSelection
          sname
          openButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          replaceButtonSelection
            @/@shell/@buttonComposite/@replaceButton/@listeners/@replaceButtonSelection/@script
            sname
            script
            sisSynchronized
            false
            sthrowException
            false
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

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

//打开数据对象或者脚本对象
String str = pathText.getText().trim();
def type = actionContext.get("type");
if(type == null){
    type = "thing";
}

if(type == "scriptObject"){
    str = str.replace('/', '.'); //Groovy编译错误是/号，转化为.号
    str = str.replace('\\', '.');
    def scriptObject = UtilAction.getActionThing(str);
    if(scriptObject != null){
        XWorkerUtils.ideOpenThing(scriptObject);
        //def bin = explorerActions.doAction("openThing", ["thing":scriptObject]);
        shell.dispose();
    }else{
        def thing = world.getThing(str);
        if(thing != null){
            XWorkerUtils.ideOpenThing(thing);
            //def bin = explorerActions.doAction("openThing", ["thing":thing]);
            shell.dispose();
        }else{
            MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
            box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle:操作信息", actionContext));
            box.setMessage(UtilString.getString("res:res.w_exp:alertActionNotExists:动作不存在!", actionContext));
            box.open();
        }
    }
}else{
    def thing = world.getThing(str);
    if(thing != null){
        XWorkerUtils.ideOpenThing(thing);
        //def bin = explorerActions.doAction("openThing", ["thing":thing]);
        shell.dispose();
    }else{
        def className = str;
        str = str.replace('/', '.'); //Groovy编译错误是/号，转化为.号
        str = str.replace('\\', '.');
        def scriptObject = UtilAction.getActionThing(str);
        if(scriptObject != null){
            XWorkerUtils.ideOpenThing(scriptObject);
            //def bin = explorerActions.doAction("openThing", ["thing":scriptObject]);
            shell.dispose();
        }else{
            //试图打开类
            try{
                def cls = Class.forName(className);
                if(cls != null){
                    openClass(actionContext, "className", className);
                    shell.dispose();
                    return;
                }
            }catch(Exception e){
            }
            
            def message = UtilString.getString("lang:d=找不到模型或类，&en=Can not find model or class, ", actionContext);
            message = message + str;
            notExists(actionContext, "message", message);
            /*
            MessageBox box = new MessageBox(shell, SWT.OK | SWT.ICON_WARNING);
            box.setText(UtilString.getString("res:res.w_exp:commonBoxTitle:操作信息", actionContext));
            box.setMessage(UtilString.getString("res:res.w_exp:alertThingNotExists:事物不存在!", actionContext));
            box.open();*/
        }
    }
}
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            false
            sdebugLog
            false
            sdescriptors
            xworker.groovy.GroovyAction
            sid
            script
              @/@shell/@buttonComposite/@replaceButton/@listeners/@replaceButtonSelection/@script/@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/@replaceButton/@listeners/@replaceButtonSelection/@script/@ActionDefined/@open
                sname
                openClass
                sclassName
                var:className
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                screateLocalVarScope
                false
                ssaveReturn
                false
                sdisableGlobalContext
                false
                sdebugLog
                false
                sdescriptors
                xworker.ide.worldexplorer.actions.ExplorerActions/@openJavaSourceViewer
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                open
                @/@shell/@buttonComposite/@replaceButton/@listeners/@replaceButtonSelection/@script/@ActionDefined/@notExsists
                sname
                notExists
                sshell
                ognl:pathText.getShell()
                sicon
                ICON_INFORMATION
                sbuttons
                OK
                stitle
                lang:d=打开&en=Open
                smessage
                var:message
                sinterpretationType
                Self
                sattributeTemplate
                false
                schildsAttributeTemplate
                false
                svarScope
                Local
                sisSynchronized
                false
                sthrowException
                true
                screateLocalVarScope
                false
                ssaveReturn
                false
                sswitchResult
                false
                sdisableGlobalContext
                false
                sdebugLog
                false
                sdescriptors
                xworker.swt.actions.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
                sid
                notExsists
        @/@shell/@buttonComposite/@replaceButton/@RowData
        sname
        RowData
        sexclude
        false
        swidth
        100
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        RowData
      @/@shell/@buttonComposite/@closeButton
      sname
      closeButton
      stext
      res:res.w_exp:closeButton:关闭（&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/@script
            sname
            script
            sisSynchronized
            false
            sthrowException
            false
            scode
            shell.dispose();
            sdescriptors
            xworker.groovy.GroovyAction
            sid
            script
        @/@shell/@buttonComposite/@closeButton/@RowData
        sname
        RowData
        sexclude
        false
        swidth
        100
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        RowData
