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 154358 - Run/Debug on test file w/ main method runs it, Run/Debug Test runs tests
Summary: Run/Debug on test file w/ main method runs it, Run/Debug Test runs tests
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: rmichalsky
URL:
Keywords: UI
Depends on:
Blocks: 66422 119922
  Show dependency tree
 
Reported: 2008-12-02 14:15 UTC by Tomas Danek
Modified: 2011-04-12 14:32 UTC (History)
3 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 Tomas Danek 2008-12-02 14:15:48 UTC
Product Version: NetBeans IDE Dev (Build 200812010201)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Linux version 2.6.27-9-generic running on i386; UTF-8; en_US (nb)
Userdir: /tmp/ud
----------------
the way how can be ran single test class differs across various project types:
- in netbeans module project, you can run test by shift-f6 (run file) right from the editor
- in java (ant) project, shift-f6 does not work, shows dialog that class does not have main method (ctrl-f6 works)
- in maven project, shift-f6 does simply nothing (ctrl-f6 works)

IMHO it would be good to unify shortcuts/actions across all project types. From my POV it makes sense to have "run file"
(shift-f6) action enabled on test classes, and on source classes which it tests have "test file" (ctrl-f6), which runs
test for this class.
Comment 1 Tomas Danek 2008-12-02 14:20:43 UTC
Ondro, please comment, thanks.
Comment 2 Milos Kleint 2008-12-02 16:10:21 UTC
see issue: 
http://www.netbeans.org/issues/show_bug.cgi?id=119922

i assume the 119922 needs to be reopened and assigned to apisupport, and then to any other project type out there.
Comment 3 Ondrej Langr 2008-12-04 15:27:19 UTC
Agreed seems that 119922 would solve the problem and make the behavior consistent.
Comment 4 Tomas Danek 2008-12-15 09:46:47 UTC
Richarde, can you take it?
Comment 5 rmichalsky 2009-02-04 14:38:22 UTC
Run/Debug on test file with main method now runs the main method, Run/Debug Test runs tests. Fixed in core-main
#aa1547c1d2f6
Comment 6 Quality Engineering 2009-02-06 07:53:20 UTC
Integrated into 'main-golden', will be available in build *200902060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8e26b35bf648
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #154358: fixed broken build (missing dependency)
Comment 7 Jesse Glick 2010-08-09 16:01:48 UTC
*** Bug 165309 has been marked as a duplicate of this bug. ***
Comment 8 Jesse Glick 2011-04-12 14:29:15 UTC
Clearer summary.