Bug 25291 - Can't browse JRE_LIB jar file when working set selected
Summary: Can't browse JRE_LIB jar file when working set selected
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-23 23:10 EDT by Colin Sharples CLA
Modified: 2003-01-21 04:25 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Sharples CLA 2002-10-23 23:10:34 EDT
I found that when I was using a working set I couldn't expand the JRE_LIB jar 
file in the package explorer. When I deselected the working set, it worked fine.
Comment 1 Martin Aeschlimann CLA 2002-10-24 03:14:00 EDT
do you have a reproducible case (what are the settings of th working set?)
Comment 2 Colin Sharples CLA 2002-10-24 15:54:33 EDT
Um, I can't even reproduce it myself today. I guess you can close this for now -
 if it happens again I will try to see if I can reproduce it and I'll reopen 
this with more info.
Comment 3 Knut Radloff CLA 2003-01-16 15:18:42 EST
Steps to reproduce:
-import a binary plugin project. E.g., org.apache.ant
-create a resource working set and check only the project org.apache.ant
-select the resource working set in the Package Explorer
-expand org.apache.ant and expand the JRE_LIB
->I only see the copyright.txt and no packages.
Comment 4 Dirk Baeumer CLA 2003-01-17 02:45:42 EST
Daniel, can you please have a look at this.
Comment 5 Dani Megert CLA 2003-01-17 04:00:00 EST
It doesn't matter if it's a resource or Java working set.

Test Case:
1. Create empty workspace
2. Add two Java project (A and B)
3. Create two Java working sets (WSA and WSB)
4. In the Package Explorer select WSA
   Obsereve: you can drill into rt.jar
5. In the Package Explorer select WSB
   Obsereve: you see rt.jar but you can't drill into rt.jar

B.getChildren() returns a rt_jar where getParent() == B, but
then rt_jar.getChildren() returns package fragments where
getParent().getParent() returns A.
Comment 6 Philipe Mulet CLA 2003-01-17 12:37:29 EST
This is the expected behavior with JAR elements. They are shared amongst 
whoever references the JAR. This will not change in any near future.

You cannot trust a JAR entry element's parent. The deepest you can trust the 
handle is the package fragment root. 

Back to JDT/UI
Comment 7 Dani Megert CLA 2003-01-20 03:58:25 EST
This means if I ask project X for children its children (JAR package fragment
roots) will return X as parent but I can not truest the parent underneath the
package fragment root, correct?

Does this mean I have to drill into the JAR and find the element in order to
build/get the correct parent chain?

Please comment and reassing directly to me (not JDT UI).
Thanks.
Comment 8 Philipe Mulet CLA 2003-01-20 04:04:15 EST
Exactly. This behavior is the one since 1.0.
Comment 9 Dani Megert CLA 2003-01-21 04:25:06 EST
Added some more smartness. In case of external archives.
Available in builds > N20030121