Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358777 - ModuleCoreNature projects should respect defaultRootSource, and should handle a defaultRootSource that is the root
Summary: ModuleCoreNature projects should respect defaultRootSource, and should handle...
Status: NEW
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.2 P   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on: 121460 357016 357866 365135
Blocks:
  Show dependency tree
 
Reported: 2011-09-23 16:43 EDT by Carl Anderson CLA
Modified: 2012-02-09 09:59 EST (History)
1 user (show)

See Also:


Attachments
Fix patch (21.46 KB, patch)
2011-10-19 13:43 EDT, Diego Sahagun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.