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.
Created attachment 119975 [details] Screenshot showing that the "Go To Test" option is disabled. Following test case failed: http://wiki.netbeans.org/TS_65_QuickSearch Test Suite: Go To Actions Test Case: Go To Test Environment: Windows 7 x64 & Ubuntu 12.04LTS, x64 Steps to Reproduce: 1. Create tests for Main class (select Main.java in Projects window and press CTRL+SHIFT+U). 2. Put caret on main method name in editor. 3. Hit CTRL + I to invoke Quick search. 4. Type "Go To Test". Actual Result: Quick search box doesn't give the option in the drop-down list box. Also, in the editor, right click, go to Navigate and see that the test file menu is disabled (see the attached screenshot to mail). This is working in Netbeans 7.1 as the quick search box gives the "Go To Test" option and when selected, opens the test file in the editor. Expected Result: Go To Test Action is properly invoked, MainTest.java file is opened in editor.
For the record, I cannot reproduce it.
I cannot reproduce, too. Tested on builds 201205200400 and 201205280002 and both worked correctly. Can you please check it again with a newer build? Thank you.
These are the exact steps to Reproduce: 1. File -> New Project -> Java -> Java Application 2. Give the Project Name in the next screen and select Finish. 3. It creates the Project and a java class with the same name. 4. Right click in the editor screen, select Navigate and see that "Go To Test" is disabled (which is correct, since we don't have a test class yet). 5. Add a dummy System.out.println statement to the main method of the newly created java class. 5. Press "Ctrl+Shift+U", with the caret still in the main method. 6. This brings up the "Create Tests" window, just press "OK" with default values provided. 7. In the next window, Select JUnit Version 4.x. 8. This should have created a test file for the main class under the test packages. 9. Now go back to the main class, right click, select Navigate and see that "Go To Test" is disabled. It is strange that this issue is reproducible only if I do the step 4. If I don't do a right click and go ahead to create the test, then there is no issue. I have verified this to be an issue in build 201205280002 (in both ubuntu 12.04 x64 and windows 7 x64). Hope this helps!
Reproduced. Thank you for the exact steps. The problem is not probably related to Quick Search. Reassigning to JUnit (sorry if it is not the correct component).
Thank you for the evaluation. I can reproduce it in NetBeans IDE Dev (Build 20120531-f785f9da5d0a). The problem was in that previous invocations of the action in the file, cashed some information regarding the file, the test locator etc. I think it is fixed now by http://hg.netbeans.org/core-main/rev/785a73822048 Could you please verify that it works for you? Thank you
Integrated into 'main-golden', will be available in build *201206010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/785a73822048 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Issue #213130 - "Go to Test" is always disabled
Verified that the issue reported is fixed in build 201206020001 (in Windows 7 x64). Thanks for the quick resolution.