Bug 164246 - [patch] [emfworkbench] Enable 2-way comment features for EMF2DOMAdapter
Summary: [patch] [emfworkbench] Enable 2-way comment features for EMF2DOMAdapter
Status: RESOLVED WONTFIX
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 1.5   Edit
Hardware: All Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0.1   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-11 21:52 EST by Jesper Moller CLA
Modified: 2008-07-23 23:41 EDT (History)
0 users

See Also:


Attachments
Patch to enable EMF model changes using COMMENT_FEATURE (4.04 KB, patch)
2006-11-11 21:56 EST, Jesper Moller CLA
no flags Details | Diff
Improved patch adds support for EMF2SAX (and for other corner cases) (26.56 KB, patch)
2007-01-05 13:59 EST, Jesper Moller CLA
no flags Details | Diff
Improved test case for this bug (63.72 KB, application/zip)
2007-01-05 14:01 EST, Jesper Moller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Moller CLA 2006-11-11 21:52:41 EST
The current implementation for comments only work when reading a DOM into an object.
This attached patch improves on this situation so that the comment can also be set  to the DOM on model changes.

It finds (or inserts) the comment node preceding the "parent" node in question, skipping over whitespace.

It has been tested with EMF2DOMSSEAdapter with nice results.

Building an example for this is not straightforward, so I've left that as an excersize - but ask if you need it, and I'll cook something up.
Comment 1 Jesper Moller CLA 2006-11-11 21:53:04 EST
Is an enhancement, not a bug.
Comment 2 Jesper Moller CLA 2006-11-11 21:56:33 EST
Created attachment 53699 [details]
Patch to enable EMF model changes using COMMENT_FEATURE

This patch enables the EMF2DOM adapter to update changes using COMMENT_FEATURE, by inserting or updating a comment node before the object's node.
Comment 3 Jesper Moller CLA 2007-01-05 13:59:43 EST
Created attachment 56481 [details]
Improved patch adds support for EMF2SAX (and for other corner cases)

* EMF2SAX now supported.
* Comment trimming/preservation is now controlled by CDATA flag.
* Support for unsetting comment.

Survives test case.
Comment 4 Jesper Moller CLA 2007-01-05 14:01:56 EST
Created attachment 56482 [details]
Improved test case for this bug

* Tests both EMF2SAX and EMF2DOM cases.
* The loadAndSave function now does a full feature for feature comparison of the model saved and loaded back in.
* Tests unsetting and space trimming.
Comment 5 Chuck Bridgham CLA 2007-02-15 14:13:31 EST
Changing target to M6
Comment 6 Carl Anderson CLA 2007-02-28 21:25:23 EST
This one passes all of our JUnits (and has its own test case).
Comment 7 John Lanuti CLA 2007-04-03 14:26:59 EDT
I don't see this as worth the potential risks for last minute in M6.  We can investigate it as a candidate for RC0.
Comment 8 Chuck Bridgham CLA 2007-05-17 14:14:16 EDT
This should have gone in during 2.0 development.  However, we just got too busy with Java EE 5 support and other critical issues.  Please make sure this gets in early in 3.0.
Comment 9 Chuck Bridgham CLA 2008-05-15 14:09:21 EDT
Moving these enhancements to 301 for now
Comment 10 Jesper Moller CLA 2008-05-15 16:28:42 EDT
To be honest, I won't be able to support this functionality going forward, as we found other was of doing two-way sync between SSE and EMF.

So I won't object to a CLOSED / WONTFIX.
Comment 11 Carl Anderson CLA 2008-07-23 23:41:06 EDT
Marking this as WONTFIX, as per Jesper's comment.