This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
We need to add one method to the JUnitPlugin interface called boolean isAvailable(). Based on the result you get from the method you should enable or disable the JUnit action in both contextual and main menus.
Accepted.
What is the status of this feature
Blocking many other issues - should be P1
Blocking 2 P3s doesn't mean it's P1, but I agree that this action should be disabled for interfaces ...
Done - committed to the trunk. I added method protected boolean canCreateTests(FileObject... fileObjects) to abstract class JUnitPlugin. The default implementation returns 'true'. Modified files: junit/src/org/netbeans/modules/junit/: plugin/JUnitPlugin.java (1.7) TestAction.java (1.8) JUnitPluginTrampoline.java (1.4) CreateTestAction.java (1.59) Diff: http://deadlock.netbeans.org/fisheye/browse/netbeans/junit/src/org/netbeans/modules/junit/plugin/JUnitPlugin.java?r1=1.6&r2=1.7 http://deadlock.netbeans.org/fisheye/browse/netbeans/junit/src/org/netbeans/modules/junit/TestAction.java?r1=1.7&r2=1.8 http://deadlock.netbeans.org/fisheye/browse/netbeans/junit/src/org/netbeans/modules/junit/JUnitPluginTrampoline.java?r1=1.3&r2=1.4 http://deadlock.netbeans.org/fisheye/browse/netbeans/junit/src/org/netbeans/modules/junit/CreateTestAction.java?r1=1.58&r2=1.59
*** Issue 58123 has been marked as a duplicate of this issue. ***
Note: There was a bug introduced to class CreateTestAction by the commit - see bug #118024 ("NullPointerException at org.netbeans.modules.junit.TestUtil.getPluginForProject"). When porting this bug, remember to port also the corresponding bugfix: http://deadlock.netbeans.org/fisheye/browse/netbeans/junit/src/org/netbeans/modules/junit/CreateTestAction.java?r1=1.60&r2=1.61
*** Issue 90830 has been marked as a duplicate of this issue. ***