Bug 28434

Summary: Open Type broken when workspace has build path problems
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: wassim.melhem
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dani Megert CLA 2002-12-17 03:33:40 EST
Build 20021216 (and also 20021213)

Open type for types in rt.jar not working. Note the test case below surfaces the
problem. I saw the same problem in my large workspace without manipulating the
.project file.

1.  Start empty workspace
2.  Create a Java project "J"
3.  Create a Java project "R"
4.  Add "R" as required project to "J"
5.  Open R/.project
6.  Remove the build command and the nature from the xml
7.  Save
8.  Exit
9.  Restart the workbench
10. Open Type "Object"
==> Error dialog: "Could not uniquely map the type name to a type"

The dialog should at least give the user a hint to check the build path.
Comment 1 Dirk Baeumer CLA 2002-12-17 08:23:41 EST
This seems to be a core bug. After restarting the workbench the content of 
the "J" project is empty in the package explorer. Calling findElement on 
project "J" with a path of java/lang/Object.class returns null. But they all 
types search engine turns a type Object.
Comment 2 Jerome Lanneluc CLA 2002-12-17 11:24:25 EST
*** Bug 28326 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2002-12-17 11:30:46 EST
Changed JavaProject.computePackageFragmentRoots(IClasspathEntry, 
ObjectVector, ...) to check if the prereq project has the Java nature instead 
of just checking if it was accessible.
Comment 4 David Audel CLA 2002-12-18 10:09:07 EST
Verified.