kelemen / netbeans-gradle-project

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.
170 stars 57 forks source link

Test Package operation stops working on Netbeans 11 with plugin 2.0.2 #428

Closed tcfurrer closed 5 years ago

tcfurrer commented 5 years ago

The "Test Package" operation used to bring up a dialog where you could provide a wildcard string to pass to Gradle as test class filter. On Netbeans 11 vc4 with plugin 2.0.2, when I select "Test Package" menu item, nothing happens.

tcfurrer commented 5 years ago

Actually this one may just be a Netbeans bug... I just noticed that there is an exception immediately after selecting "Test Package".

I'll file a Netbeans Jira ticket on this...

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at org.netbeans.modules.gradle.java.GradleJavaTokenProvider.processSelectedClass(GradleJavaTokenProvider.java:93) at org.netbeans.modules.gradle.java.GradleJavaTokenProvider.createReplacements(GradleJavaTokenProvider.java:79) at org.netbeans.modules.gradle.actions.ReplaceTokenProviderMerger.createReplacements(ReplaceTokenProviderMerger.java:72) at org.netbeans.modules.gradle.ActionProviderImpl.replaceTokens(ActionProviderImpl.java:532) at org.netbeans.modules.gradle.ActionProviderImpl.evalueteArgs(ActionProviderImpl.java:299) at org.netbeans.modules.gradle.ActionProviderImpl.invokeProjectAction(ActionProviderImpl.java:200) at org.netbeans.modules.gradle.ActionProviderImpl.invokeAction(ActionProviderImpl.java:128) at org.netbeans.modules.project.ui.actions.FileAction$3$1.run(FileAction.java:219) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

tcfurrer commented 5 years ago

I filed a Netbeans bug here: https://issues.apache.org/jira/browse/NETBEANS-2348 If it is determined there that this has nothing to do with the plugin, I/we can close this ticket.

tcfurrer commented 5 years ago

Of the four new issues I filed today, this is one is of relatively lesser importance.

kelemen commented 5 years ago

GradleJavaTokenProvider is not part of this plugin. It is in the new built-in plugin.

tcfurrer commented 5 years ago

This issue went away when I uninstalled the "Gradle" and "Groovy and Gradle" plugins, leaving only the "Gradle Support" plugin installed. I didn't realize that it was necessary to actually uninstall those conflicting plugins. I thought the fact that they were "disabled" would be equivalent to them not being installed, and so I didn't think to try uninstalling them. Bad assumption on my part there.