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.
"Go To Test" does not detect tests with different naming schemes. This is common in legacy projects coming from Eclipse. Eclipse has/had no difference between source and test-sources, so often a different packagename is/was used to distinguish files (and filter them out later). Example A: ---------- Source file: com/foo/MyClass.java Test file: com/foo/impl/MyClassTest.java (<-- this file is not detected as the opposite file) Example B: ---------- Source file: com/foo/MyClass.java All the following test files are candidates to be the opposite files. Multiple results are possible. com/foo/MyClassTest.java com/foo/MyClassIT.java com/foo/impl/MyClassTest.java com/foo/impl/MyClassAnotherTest.java com/foo/MyClassExpensiveTest.java com/foo/MyClassInexpensiveTest.java Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Created attachment 151471 [details] Patch which determines also the other file schemes Please have a look at the patch. It searches for the other file name patterns using the ClassIndex, which are printed to stdout. There can be multiple results, but the gototest-api does not support multiple target locations. So I could not finish this patch.
Created attachment 151490 [details] Patch v2 Another simplified version of the patch. This time SourceUtils.getFile() is used to resolve the file for the ElementHandle.
Thank you for the patch. Changing the gototest's TestLocator interface would require a api review and also changes to the friend modules already implementing the spi. Having said that I am removing the keyword as the patch IMHO just scratches the surface of what needs to be done to fix this issue. Would you be interested in contributing to an effort to start the api review? Thank you again for your time.
(In reply to Theofanis Oikonomou from comment #3) > Would you be interested in contributing to an effort to start the api > review? If you guide me, how to do it, then of course yes!
(In reply to markiewb from comment #4) > (In reply to Theofanis Oikonomou from comment #3) > > Would you be interested in contributing to an effort to start the api > > review? > > If you guide me, how to do it, then of course yes! This is not doable for 8.1 time schedule. Hopefully there will be time to do this for next release.