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

Bug 331429

Summary: JEEHeirarchyExportParticipant incorrectly identifying reference types as child modules
Product: [WebTools] WTP Java EE Tools Reporter: Rob Stryker <stryker>
Component: jst.j2eeAssignee: Rob Stryker <stryker>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 Flags: cbridgha: review+
Version: 3.2   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Suggested Patch none

Description Rob Stryker CLA 2010-11-30 08:49:05 EST
The use case for a USED reference that is not binary has been implemented but the non-javadoc comments indicate the use case has not been tested. Playing with the API I've discovered that it works properly *except* that JEEHeirarchyExportParticipant's code misidentifies my new custom example reference type as a child module. 

The reason it does this is because it does not check anything about the reference type, class, etc, but rather only checks if the reference's enclosing project is also a jee project. Once marked as a child module, the enclosing framework later tries to found an IModule for it and obviously cannot. 

I suggest the heirarchy participant check the classes to make sure the reference types are j2ee components or j2ee archive components or ear components.
Comment 1 Rob Stryker CLA 2010-11-30 08:54:24 EST
Created attachment 184126 [details]
Suggested Patch

This patch verifies that the virtual component was made with one of the jeetools' component factories, and thus is a true jee component (and not just a virtual component who's getProject() method returns a jee project).
Comment 2 Rob Stryker CLA 2011-08-17 05:09:37 EDT
Passing to Chuck for approval to get it into maintenance, and to avoid branching ;)
Comment 3 Rob Stryker CLA 2011-08-22 01:09:02 EDT
Hey Chuck:

Any chance you can approve this as well?
Comment 4 Chuck Bridgham CLA 2011-08-22 12:44:17 EDT
looks good
Comment 5 Rob Stryker CLA 2011-08-23 14:39:59 EDT
Committed and released to 3.3.1 and 3.4.0