Customizing Serializer [message #949709] |
Fri, 19 October 2012 08:03 |
Olivier Parisy Messages: 15 Registered: June 2011 |
Junior Member |
|
|
Hi,
I am trying to serialize an AST back to text after I performed some transformations on it. In the process, I am introducing some subclasses instances in the EMF resource, which triggers serialization errors.
I understand why (I have no rules in the grammar referencing this EClass, and I cannot simply introduce one), and the documentation clearly states that "The type of the model element must be identical to the return type of the grammar rule or the action's type. Subtypes are not allowed."
However, I would like to programmatically customize the serializer to handle this case. I tried extending ValueSerializer, but none of its methods are called for the infringing EObject.
I am currently using the ParseTreeConstructorFragment. Would the SerializerFragment provide me with more customization options with regard to this particular serialization need?
Regards.
|
|
|
Powered by
FUDForum. Page generated in 0.03203 seconds