Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 380308

Summary: The package explorer does not get refreshed when adding/removing empty library containers.
Product: [Eclipse Project] JDT Reporter: Michael Ba <mchlb>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Michael Ba CLA 2012-05-22 14:27:29 EDT
Build Identifier: Version: 3.7.2 Build id: M20120208-0800

If you add non-empty library containers to a java project or remove them, the package explorer gets refreshed and you see the containers appear or disappear.
A manual refresh of the project is not neccessary.
I expected empty library containers to behave the same way once I disabled the empty library container filter.
That's not the case. When you add an empty library container or remove it, you have to manually refresh the project in order to see any changes.
I ran into this when I tried to write a custom IClasspathContainer but eclipse's own user libraries behave the same way.

I was able to reproduce it under:
Version: 3.7.2 Build id: M20120208-0800
Version: 3.8.0 Build id: I20120518-2345

I didn't have additional plugins running and used a new workspace.

Reproducible: Always

Steps to Reproduce:
1. Disable the filter "empty library containers" in the pakage explorer.
2. Create a new user library (Preferences -> Java Build Path -> User Libraries). Don't add any jars to it.
3. Create a java project and add add the empty library to its build path (Build Path -> Add Libraries -> User Library).
4. Nothing seems to have happened. The library is not visible in the package explorer.
5. Refresh the library's project.
6. The library appears.
7. Remove the library from the build path (Build Path -> Remove from Build Path).
8. Again nothing seems to have happened. The library is still visible.
9. Refresh the library's project.
10. The library is gone.
Comment 1 Jay Arthanareeswaran CLA 2012-05-28 02:15:10 EDT
Reproduces with HEAD. I will look at this post 3.8.
Comment 2 Eclipse Genie CLA 2019-09-09 14:14:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.