^1679728160497
@
sname
shell
stext
选择节点
sstyle
APPLICATION_MODAL
sNO_TRIM
false
sCLOSE
true
sTITLE
false
sMIN
false
sMAX
false
sBORDER
true
sRESIZE
true
sON_TOP
true
sTOOL
true
sNO_FOCUS
false
swidth
400
sheight
500
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
SelectNodesShell
scapture
false
senabled
true
sredraw
true
svisible
true
sdescriptors
xworker.swt.widgets.Shell
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_registDisabled
false
sth_mark
false
  @/@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
  @/@tree
  sname
  tree
  sselectStyle
  SINGLE
  sV_SCROLL
  true
  sH_SCROLL
  true
  sCHECK
  false
  sFULL_SELECTION
  false
  sHIDE_SELECTION
  false
  sBORDER
  false
  slineVisible
  false
  smultipleColumns
  false
  sheaderVisible
  false
  ssortIndicator
  false
  smoveableColumns
  false
  sheadImages
  false
  ssubImages
  false
  scheckSelection
  false
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.Widgets/@Tree
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  tree
    @/@tree/@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
      @/@tree/@Listeners/@treeDefauleSelection
      sname
      treeDefauleSelection
      stype
      DefaultSelection
      sdescriptors
      xworker.swt.events.Listeners/@listeners/@Listener
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      treeDefauleSelection
        @/@tree/@Listeners/@treeDefauleSelection/@GroovyAction
        sname
        GroovyAction
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Local
        sdisableGlobalContext
        false
        Scode
#$@text#$@
def actionName = actionContext.get("actionName");
if(actionName == null){
    actionName = "selectThing";
}

ec.actions.doAction(actionName, actionContext, 
    ["thing": event.item.getData()]);
    
shell.dispose();
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        GroovyAction
      @/@tree/@Listeners/@treeKeydown
      sname
      treeKeydown
      stype
      KeyDown
      sdescriptors
      xworker.swt.events.Listeners/@listeners/@Listener
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      treeKeydown
        @/@tree/@Listeners/@treeKeydown/@GroovyAction
        sname
        GroovyAction
        sisSynchronized
        false
        sthrowException
        true
        suseOtherAction
        false
        svarScope
        Local
        sdisableGlobalContext
        false
        Scode
#$@text#$@
import org.eclipse.swt.SWT;

if(event.keyCode == SWT.ESC){
    shell.dispose();
}
#$@text#$@
        sinterpretationType
        Action
        screateLocalVarScope
        false
        ssaveReturn
        false
        sdebugLog
        false
        sdescriptors
        xworker.lang.actions.Actions/@GroovyAction
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        GroovyAction
  @/@init
  sname
  init
  sisSynchronized
  false
  sthrowException
  true
  suseOtherAction
  false
  svarScope
  Local
  sdisableGlobalContext
  false
  Scode
#$@text#$@
import xworker.swt.util.XWorkerTreeUtil;

def thing = thing;
if(thing instanceof String){
    thing = world.getThing(thing);
}

XWorkerTreeUtil.showThingOnTree(tree, thing, actionContext);

selectItem(currentThing, tree);
def selectItem(thing, item){
    try{
        item.setExpanded(true);
    }catch(Exception e){
    }
    if(item.getData() != null && thing == item.getData()){
        tree.select(item);
        tree.showItem(item);
    }
    
    for(citem in item.getItems()){
        selectItem(thing, citem);
    }
}
#$@text#$@
  sinterpretationType
  Action
  screateLocalVarScope
  false
  ssaveReturn
  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
