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

Bug 358777

Summary: ModuleCoreNature projects should respect defaultRootSource, and should handle a defaultRootSource that is the root
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: Carl Anderson <ccc>
Status: NEW --- QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: shr31223
Version: 3.2.4   
Target Milestone: 3.3.2 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 121460, 357016, 357866, 365135    
Bug Blocks:    
Attachments:
Description Flags
Fix patch none

Description Carl Anderson CLA 2011-09-23 16:43:52 EDT
One additional scenario- if the defined folder is the root of the project, the following exception occurs:

java.lang.IllegalArgumentException: Path must include project and resource name: /MyBundle
    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
    at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1795)
    at org.eclipse.core.internal.resources.Container.getFolder(Container.java:221)
    at org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider.getDefaultProperty(EjbFacetInstallDataModelProvider.java:70)


+++ This bug was initially created as a clone of Bug #357016 +++

Currently, if a Java EE facet is added to an existing ModuleCoreNature project, it overwrites the existing defaultRootSource with a new one, and does not take that defaultRootSource into account for the corresponding value.

We need to respect previously set defaultRootSource values.
Comment 1 Diego Sahagun CLA 2011-10-19 13:43:40 EDT
Created attachment 205552 [details]
Fix patch
Comment 2 Carl Anderson CLA 2011-10-19 13:54:04 EDT
Comment on attachment 205552 [details]
Fix patch

I thought this was the bug to handle the 3.3.2 commit of bug 357016.  When I cloned this, I should have modified the subject.
Comment 3 Carl Anderson CLA 2012-02-09 09:59:43 EST
This is a minor fix that is only necessary in the R3_3_maintenance stream.  It was put into both R3_2_maintenance and HEAD while WTP 3.3.1 was in shutdown.