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] <
ml-node+s1045684n5711668...@n5.nabble.com>

>
> 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]<http://user/SendEmail.jtp?type=node&node=5711668&i=0>>
> 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<http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5711516&code=YXR0aWxhLmtlbGVtZW44NUBnbWFpbC5jb218NTcxMTUxNnwtMTMxMjM2NTcwMA==>
> .
> NAML<http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
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-tp5711516p5711670.html
Sent from the gradle-dev mailing list archive at Nabble.com.

Reply via email to