Bug 28434 - Open Type broken when workspace has build path problems
Summary: Open Type broken when workspace has build path problems
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 28326 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-12-17 03:33 EST by Dani Megert CLA
Modified: 2002-12-18 10:09 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.