       # .finally =>
         # console.log 'CreateModule Success',@
 
+  CreateSimpleModule: (options) ->
+
+  CreateTemplateModule: (options) ->
+
   addProjectModule: (moduleInfo) ->
-
-    if moduleInfo.modulePath.lastIndexOf 'modules' isnt -1
-      console.log moduleInfo.modulePath
+    console.log moduleInfo
+    if moduleInfo.isChameleonProject is yes
+      projectConfigPath = pathM.join moduleInfo.modulePath, '..', desc.ProjectConfigFileName
+      appConfig = Util.readJsonSync projectConfigPath
+      appConfig.mainModule = moduleInfo.moduleId if appConfig.mainModule is ''
+      appConfig.modules[moduleInfo.moduleId] = desc.minVersion
+      Util.writeJson projectConfigPath,appConfig,(err) ->
+        console.log err

      console.log 'CreateModuleView was opened!'
      @modalPanel.show()

  CreateModule: (options)->
    console.log options
    info = options.moduleInfo
    filePath = pathM.join info.modulePath,info.moduleId

        if isSuccess is yes
          configFile.setEncoding('utf8')
          console.log 'CreateModule Success'
          cb = (err) =>
            console.log err
          Util.writeJson(configFilePath,configFileContent,cb)
