| EMF 2.2 missing OPTION_ELEMENT_HANDLER [message #498941] |
Thu, 19 November 2009 04:43  |
Eclipse User |
|
|
|
Hello newsgroup,
I'm using EMF 2.2 for Java 1.4 compatibility reason and I have to handle
an abstract type. I know about the mighty solution from
http://ed-merks.blogspot.com/2007/12/winters-icy-grip.html
but I have an issue in EMF 2.2 that I cannot found a solution for, I
hope you can give me a hand.
-I have added ecore:ignoreSubstitutionGroups="true" to XSD and created
the model and generated code.
-I cannot add the line
result.getDefaultSaveOptions().put(XMLResource.OPTION_ELEMEN T_HANDLER,
new ElementHandlerImpl(false));
as it seems not available in this version of EMF runtime
-Using the setter present (due to first point) I still get an xsi:type
in my XML output.
-I cannot use anymore the code like (due to first point also)
folder1.getMembersGroup().add
(ResourcePackage.Literals.DOCUMENT_ROOT__FILE, file1);
What could I do, in order to remove the xsi:type ?? Is the only solution
for this version of EMF is to not use the ignoreSubstitutionGroups and
old style code ???
Thanks
Philippe Weber
|
|
|
|
| Re: EMF 2.2 missing OPTION_ELEMENT_HANDLER [message #499219 is a reply to message #498972] |
Fri, 20 November 2009 07:58  |
Eclipse User |
|
|
|
Thanks Ed for the quick reply as always.
Ed Merks wrote:
> Philippe,
>
> Sorry, the newer support simply isn't available in older releases so
> yes, you're stuck with the more complex substitution group APIs.
>
>
> Philippe Weber wrote:
>> Hello newsgroup,
>>
>> I'm using EMF 2.2 for Java 1.4 compatibility reason and I have to
>> handle an abstract type. I know about the mighty solution from
>> http://ed-merks.blogspot.com/2007/12/winters-icy-grip.html
>> but I have an issue in EMF 2.2 that I cannot found a solution for, I
>> hope you can give me a hand.
>>
>> -I have added ecore:ignoreSubstitutionGroups="true" to XSD and created
>> the model and generated code.
>> -I cannot add the line
>> result.getDefaultSaveOptions().put(XMLResource.OPTION_ELEMEN T_HANDLER,
>> new ElementHandlerImpl(false));
>> as it seems not available in this version of EMF runtime
>> -Using the setter present (due to first point) I still get an xsi:type
>> in my XML output.
>>
>> -I cannot use anymore the code like (due to first point also)
>> folder1.getMembersGroup().add
>> (ResourcePackage.Literals.DOCUMENT_ROOT__FILE, file1);
>>
>> What could I do, in order to remove the xsi:type ?? Is the only
>> solution for this version of EMF is to not use the
>> ignoreSubstitutionGroups and old style code ???
>>
>> Thanks
>> Philippe Weber
|
|
|
Powered by
FUDForum. Page generated in 0.03472 seconds