8209064: Make intellij support more robust after changes for 2018.2

Do not treat build.xml wrapper as a template file

Reviewed-by: erikj, ihse
This commit is contained in:
Maurizio Cimadamore 2018-08-29 11:25:51 +01:00
parent 13c1bb691b
commit d91630f948
25 changed files with 16 additions and 39 deletions

View File

@ -68,12 +68,9 @@ mkdir $IDEA_OUTPUT || exit 1
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd` cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
MAKE_DIR="$SCRIPT_DIR/../make" MAKE_DIR="$SCRIPT_DIR/../make"
SUPPORT_DIR="$SCRIPT_DIR/../build/.idea-support"
IDEA_MAKE="$MAKE_DIR/idea" IDEA_MAKE="$MAKE_DIR/idea"
IDEA_TEMPLATE="$IDEA_MAKE/template" IDEA_TEMPLATE="$IDEA_MAKE/template"
mkdir -p $SUPPORT_DIR
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT" cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
#init template variables #init template variables
@ -127,11 +124,6 @@ if [ "x$SPEC" = "x" ] ; then
echo "FATAL: SPEC is empty" >&2; exit 1 echo "FATAL: SPEC is empty" >&2; exit 1
fi fi
# move build.xml out of .idea, see IDEA-189915
IDEA_BUILD_OLD=$IDEA_BUILD
IDEA_BUILD=$SUPPORT_DIR/build.xml
mv $IDEA_BUILD_OLD $IDEA_BUILD
SOURCE_FOLDER=" <sourceFolder url=\"file://\$MODULE_DIR\$/####\" isTestSource=\"false\" />" SOURCE_FOLDER=" <sourceFolder url=\"file://\$MODULE_DIR\$/####\" isTestSource=\"false\" />"
SOURCE_FOLDERS_DONE="false" SOURCE_FOLDERS_DONE="false"

View File

@ -1,7 +1,7 @@
<!-- importing.xml --> <!-- importing.xml -->
<project name="jdk" basedir="../.."> <project name="jdk">
<script language="javascript" classpath=".idea/classes"> <script language="javascript" classpath="${idea.dir}/classes">
var JdkLogger = Java.type("idea.JdkIdeaAntLogger"); var JdkLogger = Java.type("idea.JdkIdeaAntLogger");
new JdkLogger(project) new JdkLogger(project)
</script> </script>

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="AntConfiguration"> <component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml"> <buildFile url="file://$PROJECT_DIR$/make/idea/build.xml">
<properties> <properties>
<property name="intellij.ismake" value="$IsMake$" /> <property name="intellij.ismake" value="$IsMake$" />
<property name="build.target.dir" value="specDir" /> <!-- this will be replaced --> <property name="build.target.dir" value="specDir" /> <!-- this will be replaced -->
<property name="module.name" value="java.base" /> <!-- this will be replaced --> <property name="module.name" value="java.base" /> <!-- this will be replaced -->
<property name="idea.dir" value="$ModuleFileDir$" />
</properties> </properties>
<executeOn event="afterCompilation" target="post-make" /> <executeOn event="afterCompilation" target="post-make" />
</buildFile> </buildFile>

View File

@ -9,10 +9,10 @@
<jre alt="true" value="images_jdk" /> <!-- this will be replaced --> <jre alt="true" value="images_jdk" /> <!-- this will be replaced -->
<options></options> <options></options>
<ant> <ant>
<target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="images" /> <target file="file://$PROJECT_DIR$/make/idea/build.xml" name="images" />
</ant> </ant>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" assert-keyword="true" jdk-15="true"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" assert-keyword="true" jdk-15="true">
<output url="file://$PROJECT_DIR$/build/.idea-support/out" /> <output url="file://$PROJECT_DIR$/build/out" />
</component> </component>
</project> </project>

View File

@ -11,24 +11,11 @@
<component name="antWorkspaceConfiguration"> <component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml"> <buildFile url="file://$PROJECT_DIR$/make/idea/build.xml">
<runInBackground value="false" /> <runInBackground value="false" />
<targetFilters> <targetFilters>
<filter targetName="post-make" isVisible="false" />
<filter targetName="clean" isVisible="true" /> <filter targetName="clean" isVisible="true" />
<filter targetName="-do-configure" isVisible="false" />
<filter targetName="images" isVisible="true" /> <filter targetName="images" isVisible="true" />
<filter targetName="build-module" isVisible="true" />
<filter targetName="jtreg-debug" isVisible="false" />
<filter targetName="jtreg-debug-internal" isVisible="false" />
<filter targetName="jtreg" isVisible="false" />
<filter targetName="-check-jtreg.home" isVisible="false" />
<filter targetName="-def-check" isVisible="false" />
<filter targetName="-def-jtreg" isVisible="false" />
<filter targetName="-check-boot.java.home" isVisible="false" />
<filter targetName="-check-target.java.home" isVisible="false" />
<filter targetName="find-jdk-build-dir" isVisible="false" />
<filter targetName="check-env" isVisible="false" />
</targetFilters> </targetFilters>
<treeView value="false" /> <treeView value="false" />
<expanded value="true" /> <expanded value="true" />

View File

@ -76,7 +76,6 @@
<property name="make.conf.dir" location="${make.dir}/conf"/> <property name="make.conf.dir" location="${make.dir}/conf"/>
<property name="make.tools.dir" location="${make.dir}/tools"/> <property name="make.tools.dir" location="${make.dir}/tools"/>
<property name="build.dir" location="build/langtools"/> <property name="build.dir" location="build/langtools"/>
<property name="idea.support.dir" location="build/.idea-support"/>
<property name="build.modules" location="${build.dir}/modules"/> <property name="build.modules" location="${build.dir}/modules"/>
<property name="build.gensrc" location="${build.dir}/gensrc"/> <property name="build.gensrc" location="${build.dir}/gensrc"/>
<property name="build.tools" location="${build.dir}/toolclasses"/> <property name="build.tools" location="${build.dir}/toolclasses"/>
@ -270,14 +269,11 @@
<target name="idea" depends="-check-langtools.jdk.home"> <target name="idea" depends="-check-langtools.jdk.home">
<mkdir dir=".idea"/> <mkdir dir=".idea"/>
<copy todir=".idea" > <copy todir=".idea" >
<fileset dir="${make.dir}/intellij"> <fileset dir="${make.dir}/intellij/template">
<exclude name="**/src/**"/> <exclude name="**/src/**"/>
<exclude name="**/utils/**"/> <exclude name="**/utils/**"/>
</fileset> </fileset>
</copy> </copy>
<!-- move build.xml out of .idea, see IDEA-189915 -->
<mkdir dir="${idea.support.dir}"/>
<move todir="${idea.support.dir}" file=".idea/build.xml"/>
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]"> <condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]">
<isset property="jtreg.home"/> <isset property="jtreg.home"/>
</condition> </condition>
@ -293,7 +289,7 @@
<mkdir dir=".idea/classes"/> <mkdir dir=".idea/classes"/>
<javac source="${javac.build.source}" <javac source="${javac.build.source}"
target="${javac.build.target}" target="${javac.build.target}"
srcdir="${make.dir}/intellij/src" srcdir="${make.dir}/intellij/template/src"
destdir=".idea/classes"/> destdir=".idea/classes"/>
</target> </target>

View File

@ -1,12 +1,12 @@
<!-- importing.xml --> <!-- importing.xml -->
<project name="langtools" basedir="../.."> <project name="langtools" basedir = "../../..">
<script language="javascript" classpath=".idea/classes"> <script language="javascript" classpath="${idea.dir}/classes">
var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger"); var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
new LangtoolsLogger(project) new LangtoolsLogger(project)
</script> </script>
<import file="../../make/langtools/build.xml"/> <import file="../build.xml"/>
<target name="cond-clean" unless="${intellij.ismake}"> <target name="cond-clean" unless="${intellij.ismake}">
<antcall target="clean"/> <antcall target="clean"/>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="AntConfiguration"> <component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/build/.idea-support/build.xml"> <buildFile url="file://$PROJECT_DIR$/make/langtools/intellij/build.xml">
<properties> <properties>
<property name="langtools.jdk.home" value="@IDEA_TARGET_JDK@" /> <property name="langtools.jdk.home" value="@IDEA_TARGET_JDK@" />
<property name="intellij.ismake" value="$IsMake$" /> <property name="intellij.ismake" value="$IsMake$" />
<property name="idea.dir" value="$ModuleFileDir$" />
</properties> </properties>
<executeOn event="afterCompilation" target="post-make" /> <executeOn event="afterCompilation" target="post-make" />
</buildFile> </buildFile>

View File

@ -9,7 +9,7 @@
<jre alt="true" value="@IDEA_TARGET_JDK@" /> <jre alt="true" value="@IDEA_TARGET_JDK@" />
<options>@XPATCH@</options> <options>@XPATCH@</options>
<ant> <ant>
<target file="file://$PROJECT_DIR$/build/.idea-support/build.xml" name="build-all-classes" /> <target file="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" name="build-all-classes" />
</ant> </ant>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">

View File

@ -6,7 +6,7 @@
<component name="antWorkspaceConfiguration"> <component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" /> <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
<buildFile url="file://$PROJECT_DIR$/.idea/build.xml"> <buildFile url="file://$PROJECT_DIR$/make/langtools/intellij/build.xml">
<runInBackground value="false" /> <runInBackground value="false" />
<targetFilters> <targetFilters>
<filter targetName="build-all-tools" isVisible="true" /> <filter targetName="build-all-tools" isVisible="true" />