Community
Participate
Working Groups
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.
Is an enhancement, not a bug.
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.
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.
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.
Changing target to M6
This one passes all of our JUnits (and has its own test case).
I don't see this as worth the potential risks for last minute in M6. We can investigate it as a candidate for RC0.
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.
Moving these enhancements to 301 for now
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.
Marking this as WONTFIX, as per Jesper's comment.