Bug 33918

Summary: Libraries are not presented in the Package Explorer (I030227)
Product: [Eclipse Project] JDT Reporter: Marcelo Paternostro <marcelop>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Marcelo Paternostro CLA 2003-03-05 17:06:41 EST
Let's say I have the workspace below

- my.java.project
- my.java.project.core
- my.java.project.extensions

where

- This is a new workspace created with the driver I am using (I030227)
- All java projects have dependencies on multiple files (org.eclipse.*, 
junit, ...)
- The core is the only project with multiple output folders.
- "my.java.project" depends on core and exports it.
- "my.java.project.extension" depends on "my.java.project" (so it also "gets" 
the core)
- The libraries are *not* filtered in the package explorer

What I am experiencing is a problem that *only* happens in the core plugin.  
Everytime I open this workspace and expand the core plugin, there are only 2 
libraries presented: the JRE and the "before last" entry in the .classpath 
file (the last one is the output folder).  The only way to visualize the other 
libraries is to change the library configuration (by moving a library up for 
example).  FYI, before "fixing" the visualization problem, although there is 
no compilation errors or "red crosses" presented in the Package Explorer, the 
body of all the editors have "compilation error markers" and "red waves" 
because they cannot find the imports.  After "fixing" the problem, the 
editor's decorators are gone.

Nothing is logged into the .log file.

Any clues?
Comment 1 Dirk Baeumer CLA 2003-03-06 03:44:26 EST
Philippe, any comments here. I suspect that the Java model doesn't provide 
the "correct" structure since it happens when opening the workspace.
Comment 2 Philipe Mulet CLA 2003-03-06 06:01:53 EST
Are the missing pieces referenced through classpath variables (or classpath 
containers), especially using ECLIPSE_HOME* variables ?

We recently solved a defect where we were incorrectly binding them.
Instead of touching the classpath, you could simply close/reopen the projects, 
it should trigger a full refresh of the JavaModel (if inconsistent).

Comment 3 Philipe Mulet CLA 2003-03-06 07:30:21 EST
The related bug I was mentionning in previous comment is bug 33475
Comment 4 Marcelo Paternostro CLA 2003-03-06 08:07:53 EST
Yes.  All the libraries that are not presented are ECLIPSE_HOMEish.

Before tagging this defect as a duplicate, pls remember that most of the 
entries of the other projects are also ECLIPSE_HOMEish and I don't have any 
problem at all with them.  Summaring my first description there are only 2 
differences with the "my.java.project.core" project regarding the classpath 
configuration:
- It is the only one with multiple output folders
- It is the only one exported by another project.
Comment 5 Philipe Mulet CLA 2003-03-06 08:26:40 EST
I will post a patch, so you can double check that everything is fine.
One of the nice aspect of bug 33475 is that only some references were not bound 
properly... so it is very likely the same bug.

I'll wait until you confirm the patch solves your issue to close this one.
Comment 6 Philipe Mulet CLA 2003-03-06 08:40:05 EST
Patch is available in JDT/Core 2.1.x update area:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-
home/r2.1/main.html#updates


Direct link to patch:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-
home/patches/org.eclipse.jdt.core_2.1.0.zip
Comment 7 Marcelo Paternostro CLA 2003-03-06 08:48:30 EST
The problem is fixed!  Good job!

Quick question:  how can I now which build has this (or any other) fix?
Comment 8 Philipe Mulet CLA 2003-03-06 09:29:21 EST
We will release the fix into RC2 candidate build (tonight).

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