         @div class: 'form-group', =>
           @label '应用创建位置', class: 'col-sm-3 control-label'
           @div class: 'col-sm-9', =>
-            @subview 'appPath', new TextEditorView(mini: true)
+            @div class:'textEditStyle', outlet: 'appPath'
             @span class: 'inline-block status-added icon icon-file-directory openFolder', click: 'openFolder'
         @div class: 'col-sm-9 col-sm-offset-3', =>
           @div '该目录已存在', class: 'text-warning hide', outlet: 'errorMsg'
 
   initialize: ->
-    @appId.getModel().onDidChange => @setPath()
+    @appId.getModel().onDidChange => @checkProjectName()
     @appName.getModel().onDidChange => @checkInput()
-    @appPath.getModel().onDidChange => @checkPath()
+    # @appPath.getModel().onDidChange => @checkPath()
 
   attached: ->
     @type = @parentView.options.newType
     @getProjectDetail(@parentView.options.projectId, @parentView.options.account_id)
     @parentView.setNextBtn('finish')
     @parentView.disableNext()
-    @appPath.basePath = desc.newProjectDefaultPath
-    @appPath.setText @appPath.basePath
+    @appPath.setText desc.newProjectDefaultPath
 
   getProjectDetail: (projectId, accountId) ->
-    params = 
+    params =
       sendCookie: true
       qs:
         account: accountId

      @parentView.disableNext()


  setPath: ->
    currPath = @appPath.basePath
    # console.log currPath
    @appPath.setText pathM.join currPath,@appId.getText().trim() if currPath isnt ""
    @checkInput()

  checkPath: ->
    path = @appPath.getText().trim()
    @appPath.basePath = path if @appPath.hasFocus()
    if path isnt ""
      dir = new Directory(path);
      dir.exists()
        .then (isExists) =>
          # console.log isExists,@,dir.getRealPathSync()
          unless isExists
            @errorMsg.addClass('hide')
          else
            @errorMsg.removeClass('hide')
          @checkInput()

    atom.pickFolder (paths) =>
      if paths?
        console.log paths[0]
        @appPath.html paths[0]

  getElement: ->
    @element

  getProjectInfo: ->
    appId = @appId.getText().trim()
    appPath = @appPath.html().trim()
    path = pathM.join appPath,appId
    dir = new Directory(path)
    path = pathM.join desc.newProjectDefaultPath,dir.getBaseName() if dir.getParent().isRoot() is yes
    projectInfo =
      appId : @appId.getText()
      appName : @appName.getText()
      appPath : path

    console.log projectInfo
    projectInfo

  checkInput: ->
    flag1 = @appId.getText().trim() isnt ""
    flag2 = @appName.getText().trim() isnt ""
    flag3 = @appPath.html().trim() isnt ""
    flag4 = @errorMsg.hasClass('hide')

    if flag1 and flag2 and flag3 and flag4
