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.
When user selects some test class under Test Packages node it's possible to invoke action 'Run | Run Other | Run Test for ClassTest.java' and the same action to run in debugger. It executes just those tests but it's strange to call tests on tests.
The menu item wording is strange, please review.
Jano please update the spec. The contraint is that only the curently selected file name is available for creation of the menu item.
I believe there was some consensus on what to do here... has the spec been fixed?
This is fixed in the spec. The "Run File" action should run the selected file depending on what kind of file it is (main class, test class, applet, jsp, ...). The "Test File" action runs the associated test of selected class.
The J2SEActionProvider class is a bit messy. It definitely needs some tests. Also the curent invoking of actions should be changed. The Run (F6) should run the test if the test is the current file (now the Ctrl+F6) has to be used.
Although re. using Shift-F6 on tests - see also RFE re. being able to run unit tests using a main() method.
The invokeAction and isEnabledAction are now covered by unit tests in detail. In next step I will fix this issue and refactor the code a bit.
J2SEActionProvider is still the same ugly as it used to be, but now works according to UI spec and all its conditions of two most important methods are covered by detailed unit tests. Further refactorings should be easy. src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java; new revision: 1.22; previous revision: 1.21 test/unit/src/org/netbeans/modules/java/j2seproject/J2SEActionProviderTest.java; new revision: 1.2; previous revision: 1.1
Verified in custom 20040907.