8046451: Add basic IntelliJ support for langtools
authormcimadamore
Tue, 24 Jun 2014 16:04:46 +0100
changeset 25282 d49c47cad9f0
parent 25281 0babd05cbcd3
child 25283 082d51b7010b
8046451: Add basic IntelliJ support for langtools Summary: Add new ant target 'idea' to create IntelliJ langtools project Reviewed-by: jjg
langtools/.hgignore
langtools/make/build.xml
langtools/make/intellij/ant.xml
langtools/make/intellij/build.xml
langtools/make/intellij/compiler.xml
langtools/make/intellij/inspectionProfiles/langtools.xml
langtools/make/intellij/inspectionProfiles/profiles_settings.xml
langtools/make/intellij/langtools.iml
langtools/make/intellij/misc.xml
langtools/make/intellij/modules.xml
langtools/make/intellij/vcs.xml
langtools/make/intellij/workspace.xml
--- a/langtools/.hgignore	Tue Jun 24 00:43:46 2014 -0700
+++ b/langtools/.hgignore	Tue Jun 24 16:04:46 2014 +0100
@@ -1,5 +1,6 @@
 ^build/
 ^dist/
+^.idea
 /nbproject/private/
 ^.hgtip
 .DS_Store
--- a/langtools/make/build.xml	Tue Jun 24 00:43:46 2014 -0700
+++ b/langtools/make/build.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -752,6 +752,16 @@
         />
     </target>
 
+    <!--
+    **** IDE support
+    -->
+
+    <target name="idea">
+        <mkdir dir=".idea"/>
+        <copy todir=".idea" >
+            <fileset dir="make/intellij" includes="**"/>
+        </copy>
+    </target>
 
     <!--
     **** Check targets.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/ant.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AntConfiguration">
+    <buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
+      <properties>
+        <property name="boot.java.home" value="$JDKPath$" />
+        <property name="jtreg.tests" value="$FilePath$" />
+        <property name="target.java.home" value="$JDKPath$" />
+        <property name="javac.debuglevel" value="source,lines,vars" />
+        <property name="jtreg.jpda.jvmargs" value="-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5900,suspend=y" />
+      </properties>
+      <executeOn event="afterCompilation" target="build-all-classes" />
+    </buildFile>
+  </component>
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/build.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,36 @@
+<!-- importing.xml -->
+<project name="langtools" basedir="..">
+    <import file="../make/build.xml"/>
+
+    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
+        <exec-target target="jtreg-debug-internal"/>
+    </target>
+
+    <target name="jtreg-debug-internal" depends="build-all-tools,-def-jtreg">
+        <sequential>
+            <sleep seconds="2"/>
+            <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
+        </sequential>
+    </target>
+
+    <macrodef name="exec-target">
+        <attribute name="antfile" default="${ant.file}" />
+        <attribute name="target" />
+        <sequential>
+            <java classname="org.apache.tools.ant.Main" fork="true" spawn="true">
+                <arg value="-f"/>
+                <arg value="@{antfile}"/>  
+                <arg value="-Dboot.java.home=${boot.java.home}"/>
+                <arg value="-Dtarget.java.home=${target.java.home}"/>
+                <arg value="-Djtreg.home=${jtreg.home}"/>
+                <arg value="-Djtreg.tests=${jtreg.tests}"/>
+                <arg value="-Djtreg.jpda.jvmargs=${jtreg.jpda.jvmargs}"/>
+                <arg value="@{target}"/>
+                <classpath>           
+                    <pathelement path="${java.class.path}"/>
+                </classpath>
+            </java>
+        </sequential>
+    </macrodef>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/compiler.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac" />
+    <excludeFromCompile>
+      <directory url="file://$PROJECT_DIR$/test" includeSubdirectories="true" />
+    </excludeFromCompile>
+    <resourceExtensions />
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+      <entry name="!?*.form" />
+      <entry name="!?*.class" />
+      <entry name="!?*.groovy" />
+      <entry name="!?*.scala" />
+      <entry name="!?*.flex" />
+      <entry name="!?*.kt" />
+      <entry name="!?*.clj" />
+    </wildcardResourcePatterns>
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="false">
+        <processorPath useClasspath="true" />
+      </profile>
+    </annotationProcessing>
+  </component>
+  <component name="JavacSettings">
+    <option name="DEBUGGING_INFO" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all -Werror" />
+  </component>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/inspectionProfiles/langtools.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,26 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0" is_locked="false">
+    <option name="myName" value="langtools" />
+    <option name="myLocal" value="false" />
+    <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
+      <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
+      <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
+    </inspection_tool>
+    <inspection_tool class="MismatchedCollectionQueryUpdate" enabled="false" level="WARNING" enabled_by_default="false">
+      <option name="queryNames">
+        <value />
+      </option>
+      <option name="updateNames">
+        <value />
+      </option>
+    </inspection_tool>
+    <inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
+      <option name="processCode" value="false" />
+      <option name="processLiterals" value="false" />
+      <option name="processComments" value="false" />
+    </inspection_tool>
+    <inspection_tool class="SuspiciousMethodCalls" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="false" />
+    </inspection_tool>
+  </profile>
+</component>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/inspectionProfiles/profiles_settings.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,7 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="PROJECT_PROFILE" value="langtools" />
+    <option name="USE_PROJECT_PROFILE" value="true" />
+    <version value="1.0" />
+  </settings>
+</component>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/langtools.iml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+    </content>
+    <orderEntry type="sourceFolder" forTests="false" />    
+    <orderEntry type="inheritedJdk" />
+  </component>
+</module>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/misc.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="EntryPointsManager">
+    <entry_points version="2.0" />
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true">
+    <output url="file://$PROJECT_DIR$/build/intellij" />
+  </component>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/modules.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/langtools.iml" filepath="$PROJECT_DIR$/.idea/langtools.iml" />
+    </modules>
+  </component>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/vcs.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="hg4idea" />
+  </component>
+</project>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/workspace.xml	Tue Jun 24 16:04:46 2014 +0100
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">  
+  <component name="ChangeListManager">
+    <ignored path=".idea/" />
+  </component>
+  <component name="CompilerWorkspaceConfiguration">
+    <option name="MAKE_PROJECT_ON_SAVE" value="true" />
+  </component>
+  <component name="RunManager" selected="Application.javac">
+    <configuration default="false" name="javac" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="javadoc" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="javap" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="javah" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="jdeps" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.jdeps.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="sjavac" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <method />
+    </configuration>
+    <configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="true" />
+      <option name="SHMEM_ADDRESS" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5900" />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="5900" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="false" />
+      </RunnerSettings>
+      <ConfigurationWrapper RunnerId="Debug" />
+      <method>
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="jtreg-debug" />
+      </method>
+      <method />
+    </configuration>
+    <list size="7">
+      <item index="0" class="java.lang.String" itemvalue="Application.javac" />
+      <item index="1" class="java.lang.String" itemvalue="Application.javadoc" />
+      <item index="2" class="java.lang.String" itemvalue="Application.javap" />
+      <item index="3" class="java.lang.String" itemvalue="Application.javah" />
+      <item index="4" class="java.lang.String" itemvalue="Application.jdeps" />
+      <item index="5" class="java.lang.String" itemvalue="Application.sjavac" />
+      <item index="6" class="java.lang.String" itemvalue="Remote.jtreg" />
+    </list>
+  </component>
+  <component name="antWorkspaceConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="FILTER_TARGETS" value="false" />
+    <buildFile url="file://$PROJECT_DIR$/.idea/build.xml">
+      <runInBackground value="false" />
+      <targetFilters>
+        <filter targetName="build-all-tools" isVisible="true" />
+        <filter targetName="build-all-classes" isVisible="true" />
+        <filter targetName="clean" isVisible="true" />
+        <filter targetName="jtreg" isVisible="true" />
+        <filter targetName="jtreg-debug" isVisible="true" />
+        <filter targetName="checkstyle" isVisible="true" />
+      </targetFilters>
+      <viewClosedWhenNoErrors value="false" />
+      <expanded value="false" />
+    </buildFile>
+  </component>
+</project>
+