8049234: Add support for running/debugging bootstrap tools in IntelliJ
authormcimadamore
Tue, 22 Jul 2014 17:47:45 +0100
changeset 25697 b71804e27eb1
parent 25696 86204c8c6771
child 25698 eefa0e9c86c4
8049234: Add support for running/debugging bootstrap tools in IntelliJ Summary: Add support for bootstrap tools; overhaul ant logger Reviewed-by: vromero
langtools/make/build.xml
langtools/make/intellij/ant.xml
langtools/make/intellij/build.xml
langtools/make/intellij/codeStyleSettings.xml
langtools/make/intellij/compiler.xml
langtools/make/intellij/copyright/langtools.xml
langtools/make/intellij/copyright/profiles_settings.xml
langtools/make/intellij/inspectionProfiles/langtools.xml
langtools/make/intellij/langtools.iml
langtools/make/intellij/misc.xml
langtools/make/intellij/src/idea/LangtoolsIdeaAntLogger.java
langtools/make/intellij/workspace.xml
--- a/langtools/make/build.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/build.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -799,9 +799,15 @@
     <target name="idea">
         <mkdir dir=".idea"/>
         <copy todir=".idea" >
-            <fileset dir="make/intellij" includes="**"/>
+            <fileset dir="make/intellij" excludes="**/src/**"/>
         </copy>
-        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
+        <condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]">
+            <isset property="jtreg.home"/>
+        </condition>
+        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/>
+        <mkdir dir=".idea/classes"/>
+        <javac srcdir="make/intellij/src"
+               destdir=".idea/classes"/>
     </target>
 
     <!--
--- a/langtools/make/intellij/ant.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/ant.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -10,7 +10,7 @@
         <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" />
+      <executeOn event="afterCompilation" target="post-make" />
     </buildFile>
   </component>
 </project>
--- a/langtools/make/intellij/build.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/build.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -1,17 +1,14 @@
 <!-- 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>
+    <script language="javascript" classpath=".idea/classes">
+        var ideaListener = project.getBuildListeners().firstElement();            
+        var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
+        project.removeBuildListener(ideaListener)
+        project.addBuildListener(new LangtoolsLogger(ideaListener))
+    </script>
+
+    <import file="../make/build.xml"/>
 
     <macrodef name="exec-target">
         <attribute name="antfile" default="${ant.file}" />
@@ -32,5 +29,15 @@
             </java>
         </sequential>
     </macrodef>
+
+    <target name="post-make" depends="build-all-tools"/>
+
+    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
+        <exec-target target="jtreg-debug-internal"/>
+    </target>
+
+    <target name="jtreg-debug-internal" depends="-def-jtreg">
+        <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
+    </target>
 </project>
 
--- a/langtools/make/intellij/codeStyleSettings.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/codeStyleSettings.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -5,10 +5,14 @@
       <value>
         <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
         <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
-        <option name="RIGHT_MARGIN" value="80" />
+        <option name="RIGHT_MARGIN" value="100" />
+        <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
         <XML>
           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
         </XML>
+        <codeStyleSettings language="JAVA">
+          <option name="SPACE_AFTER_TYPE_CAST" value="false" />
+        </codeStyleSettings>
       </value>
     </option>
     <option name="USE_PER_PROJECT_SETTINGS" value="true" />
--- a/langtools/make/intellij/compiler.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/compiler.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -3,28 +3,16 @@
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />
     <excludeFromCompile>
+      <directory url="file://$PROJECT_DIR$/src" includeSubdirectories="true" />
       <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>
+    <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>
+  </component>  
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/langtools.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -0,0 +1,9 @@
+<component name="CopyrightManager">
+  <copyright>
+    <option name="notice" value="Copyright (c) &amp;#36;today.year, Oracle and/or its affiliates. All rights reserved.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation.  Oracle designates this&#10;particular file as subject to the &quot;Classpath&quot; exception as provided&#10;by Oracle in the LICENSE file that accompanied this code.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
+    <option name="keyword" value="Copyright" />
+    <option name="allowReplaceKeyword" value="" />
+    <option name="myName" value="langtools" />
+    <option name="myLocal" value="true" />
+  </copyright>
+</component>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/profiles_settings.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+  <settings default="langtools" />
+</component>
\ No newline at end of file
--- a/langtools/make/intellij/inspectionProfiles/langtools.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/inspectionProfiles/langtools.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -14,6 +14,10 @@
         <value />
       </option>
     </inspection_tool>
+    <inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoreObjectConstruction" value="false" />
+      <option name="ignoreUncompilable" value="true" />
+    </inspection_tool>
     <inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
       <option name="processCode" value="false" />
       <option name="processLiterals" value="false" />
--- a/langtools/make/intellij/langtools.iml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/langtools.iml	Tue Jul 22 17:47:45 2014 +0100
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build" />
+    <output-test url="file://$MODULE_DIR$/build" />
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/genstubs" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/test" type="java-test-resource" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />    
     <orderEntry type="inheritedJdk" />
--- a/langtools/make/intellij/misc.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/misc.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -4,7 +4,7 @@
     <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" />
+    <output url="file://$PROJECT_DIR$/build" />
   </component>
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/src/idea/LangtoolsIdeaAntLogger.java	Tue Jul 22 17:47:45 2014 +0100
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package idea;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.DefaultLogger;
+
+import java.util.EnumSet;
+import java.util.Stack;
+
+import static org.apache.tools.ant.Project.*;
+
+/**
+ * This class is used to wrap the IntelliJ ant logger in order to provide more meaningful
+ * output when building langtools. The basic ant output in IntelliJ can be quite cumbersome to
+ * work with, as it provides two separate views: (i) a tree view, which is good to display build task
+ * in a hierarchical fashion as they are processed; and a (ii) plain text view, which gives you
+ * the full ant output. The main problem is that javac-related messages are buried into the
+ * ant output (which is made very verbose by IntelliJ in order to support the tree view). It is
+ * not easy to figure out which node to expand in order to see the error message; switching
+ * to plain text doesn't help either, as now the output is totally flat.
+ *
+ * This logger class removes a lot of verbosity from the IntelliJ ant logger by not propagating
+ * all the events to the IntelliJ's logger. In addition, certain events are handled in a custom
+ * fashion, to generate better output during the build.
+ */
+public final class LangtoolsIdeaAntLogger extends DefaultLogger {
+
+    /**
+     * This is just a way to pass in customized binary string predicates;
+     *
+     * TODO: replace with @code{BiPredicate<String, String>} and method reference when moving to 8
+     */
+    enum StringBinaryPredicate {
+        CONTAINS() {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.contains(s2);
+            }
+        },
+        STARTS_WITH {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.startsWith(s2);
+            }
+        };
+
+        abstract boolean apply(String s1, String s2);
+    }
+
+    /**
+     * Various kinds of ant messages that we shall intercept
+     */
+    enum MessageKind {
+
+        /** a javac error */
+        JAVAC_ERROR(StringBinaryPredicate.CONTAINS, MSG_ERR, "error:", "compiler.err"),
+        /** a javac warning */
+        JAVAC_WARNING(StringBinaryPredicate.CONTAINS, MSG_WARN, "warning:", "compiler.warn"),
+        /** a javac note */
+        JAVAC_NOTE(StringBinaryPredicate.CONTAINS, MSG_INFO, "note:", "compiler.note"),
+        /** continuation of some javac error message */
+        JAVAC_NESTED_DIAG(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "  "),
+        /** a javac crash */
+        JAVAC_CRASH(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "An exception has occurred in the compiler"),
+        /** jtreg test success */
+        JTREG_TEST_PASSED(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Passed: "),
+        /** jtreg test failure */
+        JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
+        /** jtreg test error */
+        JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: ");
+
+        StringBinaryPredicate sbp;
+        int priority;
+        String[] keys;
+
+        MessageKind(StringBinaryPredicate sbp, int priority, String... keys) {
+            this.sbp = sbp;
+            this.priority = priority;
+            this.keys = keys;
+        }
+
+        /**
+         * Does a given message string matches this kind?
+         */
+        boolean matches(String s) {
+            for (String key : keys) {
+                if (sbp.apply(s, key)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of tasks we need to keep track of during logging.
+     */
+    enum Task {
+        /** javac task - invoked during compilation */
+        JAVAC("javac", MessageKind.JAVAC_ERROR, MessageKind.JAVAC_WARNING, MessageKind.JAVAC_NOTE,
+                       MessageKind.JAVAC_NESTED_DIAG, MessageKind.JAVAC_CRASH),
+        /** jtreg task - invoked during test execution */
+        JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR),
+        /** initial synthetic task when the logger is created */
+        ROOT("") {
+            @Override
+            boolean matches(String s) {
+                return false;
+            }
+        },
+        /** synthetic task catching any other tasks not in this list */
+        ANY("") {
+            @Override
+            boolean matches(String s) {
+                return true;
+            }
+        };
+
+        String taskName;
+        MessageKind[] msgs;
+
+        Task(String taskName, MessageKind... msgs) {
+            this.taskName = taskName;
+            this.msgs = msgs;
+        }
+
+        boolean matches(String s) {
+            return s.equals(taskName);
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of targets we need to keep track of during logging.
+     * A regular expression is used to match a given target name.
+     */
+    enum Target {
+        /** jtreg target - executed when launching tests */
+        JTREG("jtreg") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Running jtreg tests: " + e.getProject().getProperty("jtreg.tests");
+            }
+        },
+        /** build bootstrap tool target - executed when bootstrapping javac */
+        BUILD_BOOTSTRAP_TOOL("build-bootstrap-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building bootstrap " + tool + "...";
+            }
+        },
+        /** build classes target - executed when building classes of given tool */
+        BUILD_TOOL("build-classes-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building " + tool + "...";
+            }
+        },
+        /** synthetic target catching any other target not in this list */
+        ANY("") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Executing Ant target(s): " + e.getProject().getProperty("ant.project.invoked-targets");
+            }
+            @Override
+            boolean matches(String msg) {
+                return true;
+            }
+        };
+
+        String targetRegex;
+
+        Target(String targetRegex) {
+            this.targetRegex = targetRegex;
+        }
+
+        boolean matches(String msg) {
+            return msg.matches(targetRegex);
+        }
+
+        abstract String getDisplayMessage(BuildEvent e);
+    }
+
+    /**
+     * A custom build event used to represent status changes which should be notified inside
+     * Intellij
+     */
+    static class StatusEvent extends BuildEvent {
+
+        /** the target to which the status update refers */
+        Target target;
+
+        StatusEvent(BuildEvent e, Target target) {
+            super(new StatusTask(e, target.getDisplayMessage(e)));
+            this.target = target;
+            setMessage(getTask().getTaskName(), 2);
+        }
+
+        /**
+         * A custom task used to channel info regarding a status change
+         */
+        static class StatusTask extends org.apache.tools.ant.Task {
+            StatusTask(BuildEvent event, String msg) {
+                setProject(event.getProject());
+                setOwningTarget(event.getTarget());
+                setTaskName(msg);
+            }
+        }
+    }
+
+    /** wrapped ant logger (IntelliJ's own logger) */
+    DefaultLogger logger;
+
+    /** flag - is this the first target we encounter? */
+    boolean firstTarget = true;
+
+    /** flag - should subsequenet failures be suppressed ? */
+    boolean suppressTaskFailures = false;
+
+    /** flag - have we ran into a javac crash ? */
+    boolean crashFound = false;
+
+    /** stack of status changes associated with pending targets */
+    Stack<StatusEvent> statusEvents = new Stack<>();
+
+    /** stack of pending tasks */
+    Stack<Task> tasks = new Stack<>();
+
+    public LangtoolsIdeaAntLogger(DefaultLogger logger) {
+        this.logger = logger;
+        tasks.push(Task.ROOT);
+    }
+
+    @Override
+    public void buildStarted(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void buildFinished(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void targetStarted(BuildEvent event) {
+        EnumSet<Target> statusKinds = firstTarget ?
+                EnumSet.allOf(Target.class) :
+                EnumSet.complementOf(EnumSet.of(Target.ANY));
+
+        String targetName = event.getTarget().getName();
+
+        for (Target statusKind : statusKinds) {
+            if (statusKind.matches(targetName)) {
+                StatusEvent statusEvent = new StatusEvent(event, statusKind);
+                statusEvents.push(statusEvent);
+                logger.taskStarted(statusEvent);
+                firstTarget = false;
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void targetFinished(BuildEvent event) {
+        if (!statusEvents.isEmpty()) {
+            StatusEvent lastEvent = statusEvents.pop();
+            if (lastEvent.target.matches(event.getTarget().getName())) {
+                logger.taskFinished(lastEvent);
+            }
+        }
+    }
+
+    @Override
+    public void taskStarted(BuildEvent event) {
+        String taskName = event.getTask().getTaskName();
+        for (Task task : Task.values()) {
+            if (task.matches(taskName)) {
+                tasks.push(task);
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void taskFinished(BuildEvent event) {
+        if (tasks.peek() == Task.ROOT) {
+            //we need to 'close' the root task to get nicer output
+            logger.taskFinished(event);
+        } else if (!suppressTaskFailures && event.getException() != null) {
+            //the first (innermost) task failure should always be logged
+            event.setMessage(event.getException().toString(), 0);
+            event.setException(null);
+            //note: we turn this into a plain message to avoid stack trace being logged by Idea
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        }
+        tasks.pop();
+    }
+
+    @Override
+    public void messageLogged(BuildEvent event) {
+        String msg = event.getMessage();
+
+        boolean processed = false;
+
+        if (!tasks.isEmpty()) {
+            Task task = tasks.peek();
+            for (MessageKind messageKind : task.msgs) {
+                if (messageKind.matches(msg)) {
+                    event.setMessage(msg, messageKind.priority);
+                    processed = true;
+                    if (messageKind == MessageKind.JAVAC_CRASH) {
+                        crashFound = true;
+                    }
+                    break;
+                }
+            }
+        }
+
+        if (event.getPriority() == MSG_ERR || crashFound) {
+            //we log errors regardless of owning task
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        } else if (processed) {
+            logger.messageLogged(event);
+        }
+    }
+}
--- a/langtools/make/intellij/workspace.xml	Mon Jul 21 16:21:43 2014 -0700
+++ b/langtools/make/intellij/workspace.xml	Tue Jul 22 17:47:45 2014 +0100
@@ -7,6 +7,7 @@
     <option name="MAKE_PROJECT_ON_SAVE" value="true" />
   </component>
   <component name="RunManager" selected="Application.javac">
+    <!-- standard tools -->
     <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" />
@@ -19,7 +20,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javac" />
+      </method>
     </configuration>
     <configuration default="false" name="javadoc" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
@@ -33,7 +39,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javadoc" />
+      </method> 
     </configuration>
     <configuration default="false" name="javap" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
@@ -47,7 +58,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javap" />
+      </method> 
     </configuration>
     <configuration default="false" name="javah" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
@@ -61,21 +77,12 @@
       <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 />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javah" />
+      </method> 
     </configuration>
     <configuration default="false" name="sjavac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
@@ -89,9 +96,35 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-sjavac" />
+      </method> 
     </configuration>
-    <configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
+    <!-- bootstrap javac -->
+    <configuration default="false" name="javac (bootstrap)" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/bootstrap/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 />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-bootstrap-javac" />
+      </method> 
+    </configuration>
+    <!-- jtreg debug -->
+    <configuration default="false" name="jtreg (debug)" type="Remote" factoryName="Remote" singleton="true">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="true" />
       <option name="SHMEM_ADDRESS" />
@@ -108,15 +141,6 @@
       </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" />
@@ -131,8 +155,9 @@
         <filter targetName="jtreg-debug" isVisible="true" />
         <filter targetName="checkstyle" isVisible="true" />
       </targetFilters>
-      <viewClosedWhenNoErrors value="false" />
+      <viewClosedWhenNoErrors value="true" />
       <expanded value="false" />
+      <treeView value="false" />
     </buildFile>
   </component>
 </project>