^1665736158788
@
sname
GroovyScriptDialog
slabel
GroovyScriptDialog
sdescriptors
xworker.swt.widgets.Display
  @/@shell
  sname
  shell
  stext
  Groovy脚本
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  true
  sMAX
  true
  sBORDER
  false
  sRESIZE
  false
  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
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.widgets.Display/@Shell
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registThing
  child|xworker.core.StandaloneApp
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sgroup
  xworker
  sth_mark
  false
  sid
  shell
    @/@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
    slabel
    Groovy Connsole
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    sdescriptors
    xworker.swt.Widgets/@Composite
    sinheritDescription
    false
    sth_createIndex
    true
    sth_registThing
    child|xworker.lang.workbench.Views
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sgroup
    swt.xworker.ide
    sicon
    icons/file/groovy.gif
    sth_fileMonitor
    false
    sth_deprecated
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    sid
    mainComposite
      @/@shell/@mainComposite/@mainCompositeGridlayout
      sname
      mainCompositeGridlayout
      smakeColumnsEqualWidth
      false
      smarginWidth
      5
      smarginHeight
      5
      smarginLeft
      0
      smarginTop
      0
      smarginRight
      0
      smarginBottom
      0
      shorizontalSpacing
      5
      sverticalSpacing
      5
      sdescriptors
      xworker.swt.Layouts/@GridLayout
      sid
      mainCompositeGridlayout
      @/@shell/@mainComposite/@code
      sname
      codeText
      scodeName
      groovy
      scodeType
      groovy
      sWRAP
      false
      sdescriptors
      xworker.swt.Widgets/@CodeEditor
      sid
      code
        @/@shell/@mainComposite/@code/@codeGridData
        sname
        codeGridData
        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
        codeGridData
      @/@shell/@mainComposite/@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/@mainComposite/@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/@mainComposite/@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/@mainComposite/@buttonComposite/@restoreButton1
        sname
        groovyrunBackgroundButton
        stext
        lang:d=后台执行(&amp;B)&en=Execute under Background(&amp;B)
        stype
        SWT.PUSH
        sflat
        false
        sborder
        false
        sselected
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        spack
        false
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Button
        sid
        restoreButton1
          @/@shell/@mainComposite/@buttonComposite/@restoreButton1/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sid
          listeners
            @/@shell/@mainComposite/@buttonComposite/@restoreButton1/@listeners/@restoreButtonSeleciton
            sname
            printButtonSeleciton
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sid
            restoreButtonSeleciton
              @/@shell/@mainComposite/@buttonComposite/@restoreButton1/@listeners/@restoreButtonSeleciton/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              svarScope
              Global
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.groovy.GroovyAction;

def thing = world.getThing("xworker.ide.worldexplorer.swt.dialogs.GroovyScriptDialog/@scripts/@temp");

//代码辅助记录信息
xworker.groovy.GroovyAction.addCodeAssistorCache(thing);

//执行代码
thing.set("code", codeText.getText());
def actionContext = actionContext;

new Thread({
    thing.getAction().run(actionContext);
}).start();
#$@text#$@
              sinterpretationType
              Action
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@GroovyAction
              sid
              GroovyAction
        @/@shell/@mainComposite/@buttonComposite/@restoreButton
        sname
        groovyrunButton
        stext
        lang:d=执行(&amp;R)&en=Execute(&amp;R)
        stype
        SWT.PUSH
        sflat
        false
        sborder
        false
        sselected
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        spack
        false
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Button
        sid
        restoreButton
          @/@shell/@mainComposite/@buttonComposite/@restoreButton/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sid
          listeners
            @/@shell/@mainComposite/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton
            sname
            printButtonSeleciton
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sid
            restoreButtonSeleciton
              @/@shell/@mainComposite/@buttonComposite/@restoreButton/@listeners/@restoreButtonSeleciton/@GroovyAction
              sname
              GroovyAction
              sisSynchronized
              false
              sthrowException
              true
              suseOtherAction
              false
              svarScope
              Global
              sdisableGlobalContext
              false
              Scode
#$@text#$@
import xworker.groovy.GroovyAction;

def thing = world.getThing("xworker.ide.worldexplorer.swt.dialogs.GroovyScriptDialog/@scripts/@temp");

//代码辅助记录信息
xworker.groovy.GroovyAction.addCodeAssistorCache(thing);

//执行代码
thing.set("code", codeText.getText());
thing.getAction().run(actionContext);
#$@text#$@
              sinterpretationType
              Action
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdebugLog
              false
              sdescriptors
              xworker.lang.actions.Actions/@GroovyAction
              sid
              GroovyAction
        @/@shell/@mainComposite/@buttonComposite/@restoreButton2
        sname
        openFavirateButton
        stext
        lang:d=打开收藏&en=Open Favirate
        stype
        SWT.PUSH
        sflat
        false
        sborder
        false
        sselected
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        spack
        false
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Button
        sid
        restoreButton2
          @/@shell/@mainComposite/@buttonComposite/@restoreButton2/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sid
          listeners
            @/@shell/@mainComposite/@buttonComposite/@restoreButton2/@listeners/@openFavoriateItemSelection
            sname
            openFavoriateItemSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            openFavoriateItemSelection
              @/@shell/@mainComposite/@buttonComposite/@restoreButton2/@listeners/@openFavoriateItemSelection/@OpenShell
              sname
              OpenShell
              sparent
              ognl:codeText.getShell()
              sshellPath
              xworker.swt.xworker.dialogs.ThingRegistDialog
              ssingleInstance
              false
              sanotherThread
              false
              Sparameters
#$@text#$@
actionContext:parentContext,codeText:groovyCodeText,
"xworker.groovy.GroovyCodeIndex"|thing
#$@text#$@
              sinterpretationType
              Self
              sattributeTemplate
              false
              schildsAttributeTemplate
              false
              svarScope
              Local
              sisSynchronized
              false
              sthrowException
              true
              screateLocalVarScope
              false
              ssaveReturn
              false
              sdisableGlobalContext
              false
              sdebugLog
              false
              sdescriptors
              xworker.swt.actions.ShellActionsNew/@OpenShell
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              OpenShell
        @/@shell/@mainComposite/@buttonComposite/@restoreButton3
        sname
        addToFavorateButton
        stext
        lang:d=添加收藏&en=添加收藏
        stype
        SWT.PUSH
        sflat
        false
        sborder
        false
        sselected
        false
        scapture
        false
        senabled
        true
        sredraw
        true
        spack
        false
        svisible
        true
        sdescriptors
        xworker.swt.Widgets/@Button
        sid
        restoreButton3
          @/@shell/@mainComposite/@buttonComposite/@restoreButton3/@listeners
          sname
          listeners
          sdescriptors
          xworker.swt.events.Listeners/@listeners
          sid
          listeners
            @/@shell/@mainComposite/@buttonComposite/@restoreButton3/@listeners/@addToFavoriteSelection
            sname
            addToFavoriteSelection
            stype
            Selection
            sdescriptors
            xworker.swt.events.Listeners/@listeners/@Listener
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            addToFavoriteSelection
              @/@shell/@mainComposite/@buttonComposite/@restoreButton3/@listeners/@addToFavoriteSelection/@CreateThing
              sname
              CreateThing
              sthingName
              GroovyCode
              sdescriptor
              xworker.lang.content.QuickContent
              sinterpretationType
              Self
              sattributeTemplate
              false
              schildsAttributeTemplate
              false
              svarScope
              Local
              sisSynchronized
              false
              sthrowException
              true
              screateLocalVarScope
              false
              ssaveReturn
              false
              sswitchResult
              false
              sdisableGlobalContext
              false
              sdebugLog
              false
              sdescriptors
              xworker.ide.worldexplorer.actions.ExplorerActions/@CreateThing
              sinheritDescription
              false
              sth_createIndex
              false
              sth_registMyChilds
              false
              sth_registDisabled
              false
              sth_mark
              false
              sid
              CreateThing
                @/@shell/@mainComposite/@buttonComposite/@restoreButton3/@listeners/@addToFavoriteSelection/@CreateThing/@actions
                sname
                actions
                sdescriptors
                xworker.lang.actions.SelfAction/@actions1
                sinheritDescription
                false
                sth_createIndex
                false
                sth_registMyChilds
                false
                sth_registDisabled
                false
                sth_mark
                false
                sid
                actions
                  @/@shell/@mainComposite/@buttonComposite/@restoreButton3/@listeners/@addToFavoriteSelection/@CreateThing/@actions/@getAttributes
                  sname
                  getAttributes
                  sisSynchronized
                  false
                  sthrowException
                  true
                  suseOtherAction
                  false
                  svarScope
                  Local
                  sdisableGlobalContext
                  false
                  Scode
#$@text#$@
def attrs = [:];
attrs.put("th_createIndex","true");
attrs.put("th_registThing", "child|xworker.groovy.GroovyCodeIndex");
attrs.put("type", "code");
attrs.put("codeType", "groovy");

def code = codeText.getSelectionText();
if(code == null || code == ""){
    code = codeText.getText();
}
attrs.put("code", code);
attrs.put("styledTextForInsert", "groovyCodeText");

return attrs;
#$@text#$@
                  sinterpretationType
                  Action
                  screateLocalVarScope
                  false
                  ssaveReturn
                  false
                  sdebugLog
                  false
                  sdescriptors
                  xworker.lang.actions.Actions/@GroovyAction
                  sinheritDescription
                  false
                  sth_createIndex
                  false
                  sth_registMyChilds
                  false
                  sth_registDisabled
                  false
                  sth_mark
                  false
                  sid
                  getAttributes
      @/@shell/@mainComposite/@CodeAssistor
      sname
      CodeAssistor
      sstyledText
      codeText
      sthing
      xworker.swt.ide.worldexplorer.swt.dialogs.GroovyScriptDialog/@scripts/@temp
      sdescriptors
      xworker.swt.Widgets/@CodeAssistor
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      CodeAssistor
      @/@shell/@mainComposite/@init
      sname
      init
      sisSynchronized
      false
      sthrowException
      true
      suseOtherAction
      false
      svarScope
      Local
      sdisableGlobalContext
      false
      Scode
#$@text#$@
import xworker.swt.custom.textutils.StyledTextLineNumber;
import xworker.swt.util.SwtUtils;

if(SwtUtils.isRWT()){
    return;
}

StyledTextLineNumber.attach(codeText);

def action = world.getAction("xworker.ide.worldexplorer.swt.dialogs.GroovyScriptDialog/@scripts/@temp");
def codeFile = new File(action.fileName + ".groovy");
if(codeFile.exists()){
    def text = codeFile.text;
    if(text != null){
        def index = text.indexOf("\n");
        index = text.indexOf("\n", index + 1);
        index = text.indexOf("\n", index + 1);
        text = text.substring(index + 1, text.length());
        codeText.setText(text);
    }
}
#$@text#$@
      sinterpretationType
      Action
      screateLocalVarScope
      false
      ssaveReturn
      false
      sswitchResult
      false
      sdebugLog
      false
      sdescriptors
      xworker.swt.widgets.Widget/@Code
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      init
    @/@shell/@shellFilllayout
    sname
    shellFilllayout
    stype
    SWT.HORIZONTAL
    sdescriptors
    xworker.swt.Layouts/@FillLayout
    sid
    shellFilllayout
  @/@scripts
  sname
  scripts
  sdescriptors
  xworker.swt.widgets.Display/@scripts1
  sid
  scripts
    @/@scripts/@temp
    sname
    temp
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Global
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import xworker.lang.util.XWorkerUtils;

def registorThing = world.getThing("xworker.swt.app.Views");
def things = XWorkerUtils.searchRegistThings(registorThing, "child", [], actionContext);
for(thing in things){
    println thing.get("th_registThing");
    thing.put("th_registThing", "child|xworker.lang.workbench.Views");
    String group = thing.get("group");
    if(group == null || group == ""){
        thing.put("group", "swt");
    }else if(!group.startsWith("swt.")){
        thing.put("group", "swt." + group);
    }
    thing.save();
}
#$@text#$@
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sid
    temp
