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.

Bug 43678 - Clean up the J2SEActionProvider
Summary: Clean up the J2SEActionProvider
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL: http://projects.netbeans.org/buildsys...
Keywords:
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-05-21 14:47 UTC by Milan Kubec
Modified: 2006-03-24 10:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2004-05-21 14:47:02 UTC
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.
Comment 1 Jesse Glick 2004-05-21 16:17:27 UTC
The menu item wording is strange, please review.
Comment 2 Petr Hrebejk 2004-05-24 17:32:31 UTC
Jano please update the spec. The contraint is that only the curently
selected file name is available for creation of the menu item.
Comment 3 Jesse Glick 2004-06-15 13:20:23 UTC
I believe there was some consensus on what to do here... has the spec
been fixed?
Comment 4 jrojcek 2004-06-15 16:31:26 UTC
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.
Comment 5 Petr Hrebejk 2004-08-16 18:03:58 UTC
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. 
Comment 6 Jesse Glick 2004-08-16 18:15:48 UTC
Although re. using Shift-F6 on tests - see also RFE re. being able to
run unit tests using a main() method.
Comment 7 David Konecny 2004-08-25 11:47:11 UTC
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.
Comment 8 David Konecny 2004-08-27 13:43:34 UTC
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
Comment 9 Milan Kubec 2004-09-07 13:34:33 UTC
Verified in custom 20040907.