Bug 162037 - [model] Wrong Project for Java-Element
Summary: [model] Wrong Project for Java-Element
Status: RESOLVED DUPLICATE of bug 39468
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-24 02:36 EDT by Heywinkel CLA
Modified: 2010-07-19 12:10 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heywinkel CLA 2006-10-24 02:36:43 EDT
In the case that more than one Project reference the same jar-File, the Project for each Java-Element (e.g. IType) out of this jar-File (taken from the Types-View) seems to be the same, regardless of the Selection in the Project- and Package-View. I think the Types-View should take these selection into account.
Comment 1 Frederic Fusier CLA 2006-10-24 04:58:20 EDT
Move to JDT/UI
Comment 2 Markus Keller CLA 2006-10-26 10:27:38 EDT
Moving back to core. This is a model problem.

Import org.junit as binary plug-in. Create a second project org.junit.number2 and add org.junit/junit.jar to build path. Now look at the JarPackageFragmentRoot 'org.junit/junit.jar' (e.g. with the JavaElement view from http://www.eclipse.org/jdt/ui/update-site):

- It has children (e.g. JarPackageFragment 'junit.framework') that answer org.junit.number2 on getJavaProject(); expected: org.junit.

- The getParent() of these children is a JarPackageFragmentRoot with handleIdentifier '=org.junit.number2/\/org.junit\/junit.jar'.
This parent thinks it is Object#equals(..) to the original JarPackageFragmentRoot with handleIdentifier '=org.junit/junit.jar'
Comment 3 Frederic Fusier CLA 2007-06-19 07:50:22 EDT
Reproduced with 3.3 RC4
Comment 4 Jerome Lanneluc CLA 2007-06-20 08:03:49 EDT
Known limitation of the Java model. No action planned.
Comment 5 Markus Keller CLA 2010-07-19 12:09:49 EDT

*** This bug has been marked as a duplicate of bug 39468 ***