You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/02/24 14:02:44 UTC

svn commit: r1074130 - in /lucene/dev/trunk: build.xml dev-tools/idea/.idea/projectCodeStyle.xml dev-tools/idea/Intellij-Lucene-Codestyle.xml

Author: sarowe
Date: Thu Feb 24 13:02:44 2011
New Revision: 1074130

URL: http://svn.apache.org/viewvc?rev=1074130&view=rev
Log:
LUCENE-2611: switched the code style file from a manually configured global style to an already-setup per-project code style; adjusted code style continuation indents; added groovy code style support.

Added:
    lucene/dev/trunk/dev-tools/idea/.idea/projectCodeStyle.xml
Removed:
    lucene/dev/trunk/dev-tools/idea/Intellij-Lucene-Codestyle.xml
Modified:
    lucene/dev/trunk/build.xml

Modified: lucene/dev/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/build.xml?rev=1074130&r1=1074129&r2=1074130&view=diff
==============================================================================
--- lucene/dev/trunk/build.xml (original)
+++ lucene/dev/trunk/build.xml Thu Feb 24 13:02:44 2011
@@ -83,19 +83,9 @@
     </echo>
   </target>
 
-  <condition property="isMac"><os family="mac"/></condition>
-  <condition property="isUnix"><os family="unix"/></condition>
-  <condition property="isWindows"><os family="windows"/></condition>
-  <property environment="env"/>
-  <target name="idea" depends="copy-idea-files,finish-idea-setup-windows,
-                               finish-idea-setup-mac,
-                               finish-idea-setup-unix"
-          description="Setup IntelliJ IDEA configuration files"/>
-  <target name="copy-idea-files"> 
+  <target name="idea" description="Setup IntelliJ IDEA configuration">
     <copy todir=".">
-      <fileset dir="dev-tools/idea">
-        <exclude name="Intellij-Lucene-Codestyle.xml"/>
-      </fileset>
+      <fileset dir="dev-tools/idea"/>
     </copy>
     <echo>Running Lucene contrib db/bdb-je task 'get-je-jar' ...</echo>
     <subant target="get-je-jar">
@@ -105,57 +95,18 @@
     <subant target="get-db-jar">
       <fileset dir="lucene/contrib/db/bdb" includes="build.xml" />
     </subant>
-  </target>
-  <target name="finish-idea-setup-windows" if="isWindows">
     <echo>
-      To install the Lucene/Solr codestyle file, copy
-      dev-tools\idea\Intellij-Lucene-Codestyle.xml to
-      ${env.HOMEDRIVE}${env.HOMEPATH}\.IntelliJIdeaXX\config\codestyles\
-      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
-      After restarting IntelliJ, select "Lucene"
-      from the dropdown list at:
-      Settings | Code Style | Use global settings | Scheme name
-
       To complete IntelliJ IDEA setup, you must manually configure
       Project Structure | Project | Project SDK.
     </echo>
   </target>
-  <target name="finish-idea-setup-mac" if="isMac">
-    <echo>
-      To install the Lucene/Solr codestyle file, copy
-      dev-tools/idea/Intellij-Lucene-Codestyle.xml to
-      ~/Library/Preferences/IntelliJXX/codestyles/
-      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
-      After restarting IntelliJ, select "Lucene"
-      from the dropdown list at:
-      Settings | Code Style | Use global settings | Scheme name
-
-      To complete IntelliJ IDEA setup, you must manually configure
-      Project Structure | Project | Project SDK.
-    </echo>
-  </target>
-  <target name="finish-idea-setup-unix" if="isUnix">
-    <echo>
-      To install the Lucene/Solr codestyle file, copy
-      dev-tools/idea/Intellij-Lucene-Codestyle.xml to
-      ~/.IntelliJIdeaXX/config/codestyles/
-      where "XX" is "90" for IntelliJ 9.0.X, "10" for 10.0.X, etc.
-      After restarting IntelliJ, select "Lucene"
-      from the dropdown list at:
-      Settings | Code Style | Use global settings | Scheme name
-
-      To complete IntelliJ IDEA setup, you must manually configure
-      Project Structure | Project | Project SDK.
-    </echo>
-  </target> 
-  <target name="clean-idea" 
+  <target name="clean-idea"
           description="Removes all IntelliJ IDEA configuration files">
     <delete dir=".idea" failonerror="true"/>
     <delete failonerror="true">
       <fileset dir="." includes="*.iml,*.ipr,*.iws"/>
       <fileset dir="solr" includes="**/*.iml"/>
       <fileset dir="lucene" includes="**/*.iml"/>
-      <fileset dir="modules" includes="**/*.iml"/>
     </delete>
   </target>
 

Added: lucene/dev/trunk/dev-tools/idea/.idea/projectCodeStyle.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/idea/.idea/projectCodeStyle.xml?rev=1074130&view=auto
==============================================================================
--- lucene/dev/trunk/dev-tools/idea/.idea/projectCodeStyle.xml (added)
+++ lucene/dev/trunk/dev-tools/idea/.idea/projectCodeStyle.xml Thu Feb 24 13:02:44 2011
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS">
+      <value>
+        <option name="USE_SAME_INDENTS" value="true" />
+        <option name="OTHER_INDENT_OPTIONS">
+          <value>
+            <option name="INDENT_SIZE" value="2" />
+            <option name="CONTINUATION_INDENT_SIZE" value="4" />
+            <option name="TAB_SIZE" value="2" />
+            <option name="USE_TAB_CHARACTER" value="false" />
+            <option name="SMART_TABS" value="false" />
+            <option name="LABEL_INDENT_SIZE" value="0" />
+            <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+            <option name="USE_RELATIVE_INDENTS" value="false" />
+          </value>
+        </option>
+        <ADDITIONAL_INDENT_OPTIONS fileType="groovy">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="4" />
+          <option name="TAB_SIZE" value="2" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="java">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="4" />
+          <option name="TAB_SIZE" value="2" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="xml">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="4" />
+          <option name="TAB_SIZE" value="2" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+      </value>
+    </option>
+    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+  </component>
+</project>
+