Bug 272014 - Define facet and facet version for web fragments
Summary: Define facet and facet version for web fragments
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Hari Shankar CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: JavaEE6
Keywords: plan
Depends on: 252613
Blocks:
  Show dependency tree
 
Reported: 2009-04-13 09:38 EDT by Carl Anderson CLA
Modified: 2010-02-11 10:24 EST (History)
4 users (show)

See Also:


Attachments
Patch (204.12 KB, patch)
2010-02-10 21:00 EST, Hari Shankar CLA
no flags Details | Diff
Junit Patch (17.66 KB, text/plain)
2010-02-10 21:09 EST, Hari Shankar CLA
no flags Details
Updated Patch (221.87 KB, patch)
2010-02-10 21:51 EST, Hari Shankar CLA
no flags Details | Diff
Updated Patch (221.88 KB, patch)
2010-02-10 23:03 EST, Hari Shankar CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2009-04-13 09:38:45 EDT
As part of the Servlet 3.0 specification for Java EE 6, a web fragment can be developed.  One or more of these fragments being combined by way of (what WTP considers) a Dynamic Web project to form the full Servlet 3.0 module.
The first step to adding the tooling support for this part of the specification is to define the web fragment facet and an initial facet version.
Comment 1 Hari Shankar CLA 2010-02-10 21:00:45 EST
Created attachment 158806 [details]
Patch

This patch adds the following functionality:

1. Required facet definition, 
2. the install and post install delegates, 
3. The project creation wizard and associated infrastructure,
4. API on JavaEEProjectUtilities to query if a project is a web fragment project, and enhancing existing API to support this new project type
Comment 2 Hari Shankar CLA 2010-02-10 21:09:05 EST
Created attachment 158811 [details]
Junit Patch

Patch contains Junits that test the web fragment code.
Comment 3 Hari Shankar CLA 2010-02-10 21:51:42 EST
Created attachment 158814 [details]
Updated Patch

Updated patch to refactor properties classes to non-ui plugins. This patch contains the Junit patch as well.
Comment 4 Nitin Dahyabhai CLA 2010-02-10 22:26:38 EST
Doesn't WebFragmentFacetInstallDelegate run the risk of having the ModuleCoreNature in there twice?

And the execute() method looks a little strange on the lines that read:
+				if (container != null)
+					createWebFragmentFile(project, fv, container, monitor);
+					createManifest (project, container, monitor);

...bad formatting, or a problem waiting to happen?
Comment 5 Hari Shankar CLA 2010-02-10 23:03:14 EST
Created attachment 158817 [details]
Updated Patch

Thanks for the catch...updated the patch so that null check applies to both method calls. Just tested the addition of ModuleCore nature - it seems to be added only once..

Updated patch attached.
Comment 6 Carl Anderson CLA 2010-02-11 10:21:00 EST
Committed to HEAD for WTP 3.2 M6