Permalink
Browse files

Improve idealize command to generate .ipr file

  • Loading branch information...
Peter Hilton
Peter Hilton committed Sep 9, 2011
1 parent 51fd0ca commit f74ef27a44f67621df222c65ca2e9a3cd26a881e
Showing with 14 additions and 1 deletion.
  1. +6 −1 framework/pym/play/commands/intellij.py
  2. +8 −0 resources/idea/iprTemplate.xml
@@ -54,8 +54,13 @@ def execute(**kargs):
replaceAll(imlFile, r'%MODULE_LINKS%', mlXML)
replaceAll(imlFile, r'%MODULE_LIB_CLASSES%', msXML)
replaceAll(imlFile, r'%MODULE_LIBRARIES%', jdXML)
+
+ iprFile = os.path.join(app.path, application_name + '.ipr')
+ shutil.copyfile(os.path.join(play_env["basedir"], 'resources/idea/iprTemplate.xml'), iprFile)
+ replaceAll(iprFile, r'%PROJECT_NAME%', application_name)
+
print "~ OK, the application is ready for Intellij Idea"
- print "~ Use File/New Module/Import Existing module"
+ print "~ Use File, Open Project... to open \"" + application_name + ".ipr\""
print "~"
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/%PROJECT_NAME%.iml" filepath="$PROJECT_DIR$/%PROJECT_NAME%.iml" />
+ </modules>
+ </component>
+</project>

0 comments on commit f74ef27

Please sign in to comment.