Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316155 - JUnit View: can't open source for test classes in fragments
Summary: JUnit View: can't open source for test classes in fragments
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 11:07 EDT by Olaf Titz CLA
Modified: 2010-06-14 12:27 EDT (History)
2 users (show)

See Also:


Attachments
3 plug-in projects to reproduce (6.80 KB, multipart/x-zip)
2010-06-14 12:23 EDT, Markus Keller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olaf Titz CLA 2010-06-08 11:07:19 EDT
Build Identifier: M20090917-0800

I have plugins A, B and C which is a fragment to B.
A is a test harness which creates a JUnit3 TestSuite, containing test classes from both B and C. A is dependent on B.
When a test in B fails, I can open the test class from the JUnit view. When a test in C fails, I get the "Test class not found in selected project" error.

This is related to bug 87492: that added code to look for source in non-exported packages of dependent plugins; what is still missing is looking for source in _fragments_ of dependent plugins (which may not be dependencies themselves).

Reproducible: Always

Steps to Reproduce:
see above
Comment 1 Darin Wright CLA 2010-06-08 11:49:50 EDT
Moving to JDT.
Comment 2 Markus Keller CLA 2010-06-14 12:23:12 EDT
Created attachment 171845 [details]
3 plug-in projects to reproduce

To reproduce, run FragTest and then try to open "frag.Frag.run" from the JUnit view.
Comment 3 Markus Keller CLA 2010-06-14 12:27:44 EDT
Fixed in OpenEditorAction.

The fix is not perfect: It just falls back to searching the type in the workspace if not found in the project, so it could open a wrong one if there are multiple declarations of the same type. A more elaborate strategy could be considered when bug 72847 gets fixed.