^1649304086137
@
sname
shell
stext
lang:d=新建项目&en=Create Project
sNO_TRIM
false
sCLOSE
true
sTITLE
true
sMIN
true
sMAX
true
sBORDER
false
sRESIZE
true
sON_TOP
false
sTOOL
false
sNO_FOCUS
false
swidth
800
sheight
600
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
NewProjectDialog
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
  @/@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
  scapture
  false
  senabled
  true
  sredraw
  true
  svisible
  true
  sdescriptors
  xworker.swt.Widgets/@Composite
  sinheritDescription
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  mainComposite
    @/@mainComposite/@mainCompositeGirdLayout
    sname
    mainCompositeGirdLayout
    smakeColumnsEqualWidth
    false
    smarginWidth
    5
    smarginHeight
    5
    smarginLeft
    0
    smarginTop
    0
    smarginRight
    0
    smarginBottom
    0
    shorizontalSpacing
    5
    sverticalSpacing
    5
    sdescriptors
    xworker.swt.Layouts/@GridLayout
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    mainCompositeGirdLayout
    @/@mainComposite/@mainSashForm
    sname
    mainSashForm
    sstyle
    HORIZONTAL
    sSMOOTH
    false
    sweights
    30,70
    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/@SashForm
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    mainSashForm
      @/@mainComposite/@mainSashForm/@mainSashFormGridData
      sname
      mainSashFormGridData
      sstyle
      FILL_BOTH
      shorizontalIndent
      0
      swidth
      -1
      sheight
      -1
      shorizontalAlignment
      BEGINNING
      sverticalAlignment
      CENTER
      shorizontalSpan
      1
      sverticalSpan
      1
      sgrabExcessHorizontalSpace
      false
      sgrabExcessVerticalSpace
      false
      sdescriptors
      xworker.swt.layout.LayoutDatas/@GridData
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      mainSashFormGridData
      @/@mainComposite/@mainSashForm/@thingRegist
      sname
      thingRegist
      sthing
      xworker.ide.worldexplorer.swt.dialogs.NewProjectIndex
      sregistType
      child
      sparent
      false
      ssearchByKeywords
      true
      sshowContent
      false
      scontentDisplayType
      Composite
      scontentDefaultOpenMethod
      thingDesc
      sforceUseDefaultOpenMethod
      false
      sshowDescBrowser
      false
      sdescBrowserRight
      false
      sautoLoad
      true
      scache
      true
      scheck
      false
      sdisableRegistMyChilds
      false
      sdescritporForNewThing
      xworker.swt.xworker.ThingRegistThing
      sdescritporChilds
      false
      sdescriptors
      xworker.swt.Widgets/@ThingRegistSelector
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      thingRegist
        @/@mainComposite/@mainSashForm/@thingRegist/@actions
        sname
        actions
        sdescriptors
        xworker.swt.xworker.ThingRegistSelector/@actions1
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        actions
          @/@mainComposite/@mainSashForm/@thingRegist/@actions/@selected
          sname
          selected
          sisSynchronized
          false
          sthrowException
          true
          suseOtherAction
          false
          svarScope
          Local
          sdisableGlobalContext
          false
          Scode
#$@text#$@
import org.xmeta.ActionContext;

if(thing == null && actionContext.get("contentComposite") != null){
    thing = world.getThing("xworker.swt.ide.worldexplorer.swt.dialogs.NewProjectIndex/@desc");
    if(actionContext.get("okButton") != null){
        okButton.setEnabled(false);
    }
}

if(thing != null){
    //移除contentComposite下的内容
    for(child in contentComposite.getChildren()){
        child.dispose();
    }
    
    //创建内容
    def ac = new ActionContext();
    ac.put("parentContext", actionContext);
    ac.put("parent", contentComposite);
    thing.doAction("create", ac);
    contentComposite.layout();
    //println("xxxxxxx");
    
    _g.put("prjActions", ac.get("actions"));
    if(actionContext.get("okButton") != null){
        okButton.setEnabled(true);
    }
}else{

}
#$@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
          selected
      @/@mainComposite/@mainSashForm/@contentComposite
      sname
      contentComposite
      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
      sinheritDescription
      false
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_registDisabled
      false
      sth_mark
      false
      sid
      contentComposite
        @/@mainComposite/@mainSashForm/@contentComposite/@contentCompositeFillLayout
        sname
        contentCompositeFillLayout
        stype
        SWT.HORIZONTAL
        sdescriptors
        xworker.swt.Layouts/@FillLayout
        sinheritDescription
        false
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_registDisabled
        false
        sth_mark
        false
        sid
        contentCompositeFillLayout
    @/@mainComposite/@36175
    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
    36175
      @/@mainComposite/@36175/@36176
      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.layout.LayoutDatas/@GridData
      sid
      36176
      @/@mainComposite/@36175/@36177
      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
      36177
      @/@mainComposite/@36175/@36178
      sname
      okButton
      stext
      lang:d=确定&en=Ok
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      false
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sth_createIndex
      false
      sid
      36178
        @/@mainComposite/@36175/@36178/@36179
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        36179
        @/@mainComposite/@36175/@36178/@36180
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        36180
          @/@mainComposite/@36175/@36178/@36180/@36181
          sname
          okButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          36181
            @/@mainComposite/@36175/@36178/@36180/@36181/@GroovyAction
            sname
            GroovyAction
            sisSynchronized
            false
            sthrowException
            true
            suseOtherAction
            false
            svarScope
            Local
            sdisableGlobalContext
            false
            Scode
#$@text#$@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;

import org.xmeta.ActionContext;
import xworker.lang.util.XWorkerUtils;

if(actionContext.get("prjActions") == null){
    def box = new MessageBox(mainSashForm.getShell(), SWT.ICON_WARNING | SWT.OK);
    box.setText("创建项目");
    box.setMessage("选中的创建项目的方法没有actions(ActionContainer)！");
    box.open();
    return;
}

//创建项目，项目也是事物管理器
def thingManager = prjActions.doAction("createProject");
if(thingManager != null){
    //成功创建
    if(actionContext.get("shell") != null){
        shell.dispose();
    }
    
    //不是项目，而是结果
    if(thingManager == true){
        return;
    }
    
    //提示是否添加到工作组中
    def ac = new ActionContext();
    ac.put("parent", XWorkerUtils.getIDEShell());
    ac.put("thingManager", thingManager);
    
    def thing = world.getThing("xworker.ide.worldexplorer.swt.dialogs.AddWorkSetDialog");
    thing.doAction("run", ac);
}
#$@text#$@
            sinterpretationType
            Action
            screateLocalVarScope
            false
            ssaveReturn
            false
            sswitchResult
            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
      @/@mainComposite/@36175/@36182
      sname
      cancelButton
      stext
      lang:d=取消&en=Cancel
      stype
      SWT.PUSH
      sflat
      false
      sborder
      false
      sselected
      false
      scapture
      false
      senabled
      true
      sredraw
      true
      svisible
      true
      sdescriptors
      xworker.swt.Widgets/@Button
      sth_createIndex
      false
      sid
      36182
        @/@mainComposite/@36175/@36182/@36183
        sname
        RowData
        sexclude
        false
        swidth
        80
        sheight
        -1
        sdescriptors
        xworker.swt.layout.LayoutDatas/@RowData
        sth_createIndex
        false
        sid
        36183
        @/@mainComposite/@36175/@36182/@36184
        sname
        Listeners
        sdescriptors
        xworker.swt.widgets.Widget/@Listeners
        sth_createIndex
        false
        sid
        36184
          @/@mainComposite/@36175/@36182/@36184/@36185
          sname
          cancelButtonSelection
          stype
          Selection
          sdescriptors
          xworker.swt.events.Listeners/@listeners/@Listener
          sth_createIndex
          false
          sid
          36185
            @/@mainComposite/@36175/@36182/@36184/@36185/@Dispose
            sname
            Dispose
            scontrolList
            shell
            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.ControlActions/@Dispose
            sinheritDescription
            false
            sth_createIndex
            false
            sth_registMyChilds
            false
            sth_registDisabled
            false
            sth_mark
            false
            sid
            Dispose
    @/@mainComposite/@init
    sname
    init
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.ActionContext;

import org.eclipse.swt.widgets.Shell;

//如果不是以对话框的方式启动的，关闭cancelButton
if(mainComposite.getParent() instanceof Shell){    
}else{
    cancelButton.dispose();
}

def thing = world.getThing("xworker.ide.worldexplorer.swt.dialogs.NewProjectIndex/@desc");
if(thing != null){
    //移除contentComposite下的内容
    for(child in contentComposite.getChildren()){
        child.dispose();
    }
    
    //创建内容
    def ac = new ActionContext();
    ac.put("parentContext", actionContext);
    ac.put("parent", contentComposite);
    thing.doAction("create", ac);
    contentComposite.layout();
    //println("xxxxxxx");
    
    _g.put("prjActions", ac.get("actions"));
    if(actionContext.get("okButton") != null){
        okButton.setEnabled(true);
    }
}
#$@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
