Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346013 - WebContent node disappears from its parent project in Project Explorer after that folder is added as a class folder to another project.
Summary: WebContent node disappears from its parent project in Project Explorer after ...
Status: NEW
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.servlet (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Diego Sahagun CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 19:06 EDT by Slava Kabanovich CLA
Modified: 2012-05-01 16:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Kabanovich CLA 2011-05-16 19:06:59 EDT
Build Identifier: I20110310-1119

Class org.eclipse.jst.servlet.ui.internal.navigator.WebJavaContentProvider in method cleanJavaContribution(Set) removes a node from the set of proposed children of project node if it is resource and there exists in Java Model an element for it. It does not check that Java element may belong to another project. As the result in this case, a folder cannot be found in Project Explorer under its project node if it was added as class folder to some other project.

I understand that this feature serves to prevent duplicate child nodes, and in its way it does the job well even in this case, but it might be somewhat discouraging not to be able to find a resource under its project and have to remember that it deserted to another one.

Reproducible: Always

Steps to Reproduce:
1. Create Web Dynamic Project TestWeb.
2. Create Java Project TestJava.
3. Add WebContent folder of TestWeb as class folder to TestJava.
4. Refresh TestWeb node in Project Explorer (by the way, necessity of refresh looks like one more bug)
5. Make sure that WebContent node disappeared from TestWeb and there is no way to access web resources through TestWeb node.