Updating intellij idegen project template to use jdk 1.6.

Also excluding prebuilt jars from classpath. These include all
previous versions of the android sdk jars. Increased heap size to 800
so google intellij plugin does not complain. Changed default
configuration to use global code style insead of per project code
style.

Change-Id: If97550000fdc282cf6d506eb80b830ff4c1b87b9
diff --git a/tools/idegen/README b/tools/idegen/README
index 1f773d8..02bb593 100644
--- a/tools/idegen/README
+++ b/tools/idegen/README
@@ -7,10 +7,10 @@
     If this is your first time using IDEGen...
 
         IDEA needs a lot of memory. Add "-Xms748m -Xmx748m" to your VM options
-        in "IDEA_HOME/bin/idea.vmoptions" on Linux or 
+        in "IDEA_HOME/bin/idea.vmoptions" on Linux or
         "IntelliJ IDEA.app/Contents/Info.plist" on OS X.
 
-        Create a JDK configuration named "1.5 (No Libraries)" by adding a new
+        Create a JDK configuration named "1.6 (No Libraries)" by adding a new
         JDK like you normally would and then removing all of the jar entries
         under the "Classpath" tab. This will ensure that you only get access to
         Android's core libraries and not those from your desktop VM.
@@ -18,13 +18,13 @@
     From the project's root directory...
 
         Repeat these steps after each sync...
-        
+
         1) make (to produce generated .java source)
         2) development/tools/idegen/idegen.sh
         3) Open android.ipr in IntelliJ. If you already have the project open,
            hit the sync button in IntelliJ, and it will automatically detect the
            updated configuration.
-        
+
         If you get unexpected compilation errors from IntelliJ, try running
         "Build -> Rebuild Project". Sometimes IntelliJ gets confused after the
         project changes significantly.
@@ -53,7 +53,7 @@
 
 Excluding source roots and jars
 
-    IDEGen keeps an exclusion list in the "excluded-paths" file. This file 
+    IDEGen keeps an exclusion list in the "excluded-paths" file. This file
     has one regular expression per line that matches paths (relative to the
     project root) that should be excluded from the IDE configuration. We
     use Java's regular expression parser (see java.util.regex.Parser).
@@ -62,7 +62,7 @@
     "excluded-paths" file in the project's root directory. For example, you
     might exclude all apps except the Browser in your IDE configuration with
     this regular expression: "^packages/apps/(?!Browser)".
-    
+
 Controlling source root ordering (Eclipse)
 
     You may want some source roots to come before others in Eclipse. Simply
@@ -77,4 +77,4 @@
     For example, if you want your applications's source root to come first,
     you might add an expression like "^packages/apps/MyApp/src$" to the top
     of the "path-precedence" file.  To make source roots under ./out come last,
-    add "^(?!out/)" (which matches all paths that don't start with "out/").
\ No newline at end of file
+    add "^(?!out/)" (which matches all paths that don't start with "out/").
diff --git a/tools/idegen/excluded-paths b/tools/idegen/excluded-paths
index 35280ad..9122c30 100644
--- a/tools/idegen/excluded-paths
+++ b/tools/idegen/excluded-paths
@@ -62,3 +62,6 @@
 # This directory contains only an R.java file which is the same as the one in
 # Camera_intermediates.
 ^out/target/common/obj/APPS/CameraTests_intermediates$
+
+# Exclude all prebuilts jars.
+^prebuilts/.*\.jar$
diff --git a/tools/idegen/idegen.ipr b/tools/idegen/idegen.ipr
index 00cf4fd..75771b5 100644
--- a/tools/idegen/idegen.ipr
+++ b/tools/idegen/idegen.ipr
@@ -135,7 +135,7 @@
     <option name="GENERATE_NO_WARNINGS" value="false" />
     <option name="DEPRECATION" value="true" />
     <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+    <option name="MAXIMUM_HEAP_SIZE" value="800" />
   </component>
   <component name="JavadocGenerationManager">
     <option name="OUTPUT_DIRECTORY" />
@@ -298,7 +298,7 @@
       <module fileurl="file://$PROJECT_DIR$/idegen.iml" filepath="$PROJECT_DIR$/idegen.iml" />
     </modules>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6 (no libraries)" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/classes" />
   </component>
   <component name="RmicSettings">
diff --git a/tools/idegen/templates/android.ipr b/tools/idegen/templates/android.ipr
index d6aba4b..f857d4a 100644
--- a/tools/idegen/templates/android.ipr
+++ b/tools/idegen/templates/android.ipr
@@ -26,7 +26,6 @@
         <option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true" />
       </value>
     </option>
-    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
   </component>
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />
@@ -122,7 +121,7 @@
     <option name="GENERATE_NO_WARNINGS" value="false" />
     <option name="DEPRECATION" value="false" />
     <option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all,-deprecation,-serial" />
-    <option name="MAXIMUM_HEAP_SIZE" value="512" />
+    <option name="MAXIMUM_HEAP_SIZE" value="800" />
   </component>
   <component name="JavadocGenerationManager">
     <option name="OUTPUT_DIRECTORY" />
@@ -282,7 +281,7 @@
       <module fileurl="file://$PROJECT_DIR$/android.iml" filepath="$PROJECT_DIR$/android.iml" />
     </modules>
   </component>
-  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5 (No Libraries)" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6 (No Libraries)" project-jdk-type="JavaSDK">
     <output url="file:///tmp/intellij$PROJECT_DIR$/classes" />
   </component>
   <component name="RmicSettings">