^1640696313507
@
sname
SelectTargetThingDialog
slabel
SelectTargetThingDialog
sdescriptors
xworker.swt.widgets.Display
sid
SelectTargetThingDialog
  @/@shell
  sname
  shell
  stext
  事物
  sstyle
  APPLICATION_MODAL
  sNO_TRIM
  false
  sCLOSE
  true
  sTITLE
  true
  sMIN
  false
  sMAX
  false
  sBORDER
  false
  sRESIZE
  false
  sON_TOP
  false
  sTOOL
  false
  sNO_FOCUS
  false
  swidth
  500
  sheight
  100
  scenterScreen
  true
  spack
  false
  smaximized
  false
  sfullScreen
  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
    slabel
    shellGridLayout
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sid
    shellGridLayout
    @/@shell/@thingPath
    sname
    thingPathLbel
    sBORDER
    false
    stype
    HORIZONTAL
    sshadow
    SHADOW_OUT
    salignment
    LEFT
    stext
    事物路径：
    scapture
    false
    senabled
    true
    sredraw
    true
    svisible
    true
    slabel
    thingPathLbel
    sdescriptors
    xworker.swt.Widgets/@Label
    sid
    thingPath
    @/@shell/@thing
    sname
    thingPathText
    sdescriptors
    xworker.swt.xworker.attributeEditor.ThingSelector
    sid
    thing
      @/@shell/@thing/@thingPathGridData
      sname
      thingPathGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      thingPathGridData
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      thingPathGridData
    @/@shell/@5139
    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
    5139
      @/@shell/@5139/@5140
      sname
      buttonCompositeGridData
      sstyle
      FILL_HORIZONTAL
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      END
      sverticalAlignment
      CENTER
      shorizontalSpan
      2
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      slabel
      buttonCompositeGridData
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sid
      5140
      @/@shell/@5139/@5141
      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
      slabel
      buttonCompositeRowLayout
      sdescriptors
      xworker.swt.Layouts/@RowLayout
      sid
      5141
      @/@shell/@5139/@okButton
      sname
      okButton
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@okButton
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      slabel
      okButton
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      okButton
        @/@shell/@5139/@okButton/@Listeners
        sname
        Listeners
        slabel
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sid
        Listeners
          @/@shell/@5139/@okButton/@Listeners/@cancelButtonSeleciton
          sname
          okButtonSeleciton
          stype
          Selection
          slabel
          okButtonSeleciton
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          cancelButtonSeleciton
            @/@shell/@5139/@okButton/@Listeners/@cancelButtonSeleciton/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.xmeta.Thing;

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

def path = thingPathText.getText();
def thing = world.getThing(path);
if(thing != null){
    def box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
    box.setText("操作提示");
    box.setMessage("笔记事物已经存在，确定要覆盖么？");
    if(box.open() != SWT.OK){
        return;
    }
}

def lastDotIndex = path.lastIndexOf(".");
def name = path.substring(lastDotIndex + 1, path.length());
def categeory = path.substring(0, lastDotIndex);
switch(type){
    case "notes":
        thing = new Thing("xworker.lang.note.Note");
        thing.th_registThing = "notes|" + thingPath;
        thing.name = name;
        thing.th_createIndex = "true";
        thing.saveTo(categeory);
        break;
}

explorerActions.doAction("openThing", ["thing":thing]);

def box = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
box.setText("操作提示");
box.setMessage("笔记事物已经保存，并已在编辑器中打开。");
box.open();
shell.dispose();
#$@text#$@
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
        @/@shell/@5139/@okButton/@RowData
        sname
        RowData
        sexclude
        false
        swidth
        60
        sheight
        -1
        slabel
        RowData
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sid
        RowData
      @/@shell/@5139/@cancelButton
      sname
      cancelButton
      stext
      label:xworker.swt.ide.worldexplorer.swt.i18n.I18nResource/@buttons/@cancelButton
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      slabel
      cancelButton
      sdescriptors
      xworker.swt.Widgets/@Button
      sid
      cancelButton
        @/@shell/@5139/@cancelButton/@Listeners
        sname
        Listeners
        slabel
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sid
        Listeners
          @/@shell/@5139/@cancelButton/@Listeners/@cancelButtonSeleciton
          sname
          cancelButtonSeleciton
          stype
          Selection
          slabel
          cancelButtonSeleciton
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sid
          cancelButtonSeleciton
            @/@shell/@5139/@cancelButton/@Listeners/@cancelButtonSeleciton/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Global
            sdisableGlobalContext
            false
            scode
            shell.dispose();
            sdescriptors
            xworker.lang.actions.Actions/@GroovyAction
            sid
            GroovyAction
        @/@shell/@5139/@cancelButton/@RowData
        sname
        RowData
        sexclude
        false
        swidth
        60
        sheight
        -1
        slabel
        RowData
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sid
        RowData
    @/@shell/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Global
    sdisableGlobalContext
    false
    Scode
#$@text#$@
thingPathText.setText(path);

def type = actionContext.get("type");
if(type == null){
    type = "notes";
    actionContext.getScope(0).put("type", type);
}

if(type == "notes"){
    shell.setText(world.getThing("xworker.lang.relation.editors.SelectTargetThingDialog/@thing/@shellLabel").metadata.label);
}else if(type == ""){
}
#$@text#$@
    sdescriptors
    xworker.swt.Widgets/@Code
    sid
    init
  @/@thing
  sname
  thing
  slabel
  thing
  sdescriptors
  xworker.core.util.I18nResource
  sid
  thing
    @/@thing/@shellLabel
    sname
    noteTitle
    slabel
    请选择笔记事物的路径
    szh_label
    请选择笔记事物的路径
    sen_label
    Please select the note thing path
    sdescriptors
    xworker.core.util.I18nResource/@resource
    sid
    shellLabel
