On 12/08/2013, at 5:20 PM, Alex Ruiz <alr...@google.com> wrote: > Hi Adam, > > Thanks to the diagnostics you added, it seems that the problem is in IntelliJ.
I don't think it's a problem with IntelliJ. Your code should just work. I'll make some fixes to the tooling API to make this work. > I'm attaching the output of both Studio (IDEA) and a simple Java app. The > classpath from Studio is empty, while the one from the simple Java app is > correct. I'm going to test a little bit more on Studio, and if this is an > issue with IDEA, I'll let the IDEA folks know about this issue. > > Thanks, > -Alex > > > > On Sun, Aug 11, 2013 at 9:54 PM, Alex Ruiz <alr...@google.com> wrote: > Thanks, Adam. In addition to Attila's example, I'll extract my code into a > unit test to make it easier to run. > > > On Sun, Aug 11, 2013 at 4:37 PM, kelemen <attila.keleme...@gmail.com> wrote: > You can debug my plugin easily: > > 1. Download the current sources: > https://github.com/kelemen/netbeans-gradle-project/tree/gradle_1.8_tooling_api > 2. Install NetBeans (I'm using 7.3.1 but should work with 7.2 as well). > 3. Build the project. > 4. Debug (This will start a new instance of NB). > 5. Open any project. > > Note 1: It is important to always build the project before run because it > seems that NB don't automatically build NB Maven based modules (unlike simple > Maven projects). > > Note 2: If you want to step into the sources of the Tooling API, you have to > right click on the "Dependencies" node and "Download Sources". > > Also, you need to configure, the Gradle version used to load the project. You > can do this in Tools/Options/Miscellaneous/Gradle for every project but by > default the version defined for the wrapper is used, so you can rely on that. > Anyway, every method the Tooling API allows is possible to use as a Gradle > location. See the wiki: > https://github.com/kelemen/netbeans-gradle-project/wiki/Project-Properties > ("Gradle home") > > These are the new lines printed by the most recent Tooling API: > > Tooling API ClassLoader: ModuleCL@91ed751[org.netbeans.gradle.project] (class > org.netbeans.StandardModule$OneModuleClassLoader) > * Classpath: > [file:/C:/Program%20Files/NetBeans%207.3/platform/lib/boot.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/org-openide-modules.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/org-openide-util-lookup.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/org-openide-util.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/boot_ja.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/boot_pt_BR.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/boot_ru.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/boot_zh_CN.jar, > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-modules_ja.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-modules_pt_BR.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-modules_ru.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-modules_zh_CN.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util-lookup_ja.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util-lookup_pt_BR.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util-lookup_ru.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util-lookup_zh_CN.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util_ja.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util_pt_BR.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util_ru.jar, > > file:/C:/Program%20Files/NetBeans%207.3/platform/lib/locale/org-openide-util_zh_CN.jar, > file:/C:/Program%20Files/Java/jdk1.7.0_13/lib/dt.jar, > file:/C:/Program%20Files/Java/jdk1.7.0_13/lib/tools.jar] > * Codesource: > jar:file:/C:/git.repo/netbeans-gradle-project/target/netbeans_clusters/extra/modules/ext/org.netbeans.gradle.project/org-gradle/gradle-tooling-api.jar!/ > * Resource: > jar:file:/C:/git.repo/netbeans-gradle-project/target/netbeans_clusters/extra/modules/ext/org.netbeans.gradle.project/org-gradle/gradle-tooling-api.jar!/org/gradle/tooling/internal/consumer/connection/ActionAwareConsumerConnection$DefaultBuildActionSerializationDetails.class > > > > > 2013/8/12 Adam Murdoch [via Gradle] <[hidden email]> > > I've added some diagnostics to the latest nightly build. Can you give this a > try and send me the output. It's logged to System.out. > > Also is there some way I can run your code to debug what's going on? > > On 11/08/2013, at 4:35 AM, kelemen <[hidden email]> wrote: > >> The new API throws an exception for me. Here is the stacktrace: >> https://gist.github.com/kelemen/6201595 >> >> And here is the code using the new API: >> https://github.com/kelemen/netbeans-gradle-project/blob/d3a82f4f761fc6bf8ebcf75b00ae8da81f89ce58/src/main/java/org/netbeans/gradle/project/model/NbGradle18ModelLoader.java >> >> >> >> -- >> View this message in context: >> http://gradle.1045684.n5.nabble.com/Proposal-for-retrieving-multiple-types-of-models-from-a-project-in-a-single-pass-using-the-Tooling-AI-tp5711516p5711666.html >> Sent from the gradle-dev mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com > > > > > > If you reply to this email, your message will be added to the discussion > below: > http://gradle.1045684.n5.nabble.com/Proposal-for-retrieving-multiple-types-of-models-from-a-project-in-a-single-pass-using-the-Tooling-AI-tp5711516p5711668.html > To unsubscribe from Proposal for retrieving multiple types of models from a > project in a single pass, using the Tooling API, click here. > NAML > > > View this message in context: Re: Proposal for retrieving multiple types of > models from a project in a single pass, using the Tooling API > Sent from the gradle-dev mailing list archive at Nabble.com. > > > <gradle-output-app.txt><gradle-output-studio.txt> > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com