Skip to main content



      Home
Home » Modeling » EMF » EMF 2.2 missing OPTION_ELEMENT_HANDLER
EMF 2.2 missing OPTION_ELEMENT_HANDLER [message #498941] Thu, 19 November 2009 04:43 Go to next message
Eclipse UserFriend
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 #498972 is a reply to message #498941] Thu, 19 November 2009 06:40 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: EMF 2.2 missing OPTION_ELEMENT_HANDLER [message #499219 is a reply to message #498972] Fri, 20 November 2009 07:58 Go to previous message
Eclipse UserFriend
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
Previous Topic:Customizing standard EMF editor Drag & Drop behavior
Next Topic:Attribute of an EAttribute?!
Goto Forum:
  


Current Time: Sat Nov 08 00:03:01 EST 2025

Powered by FUDForum. Page generated in 0.03807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top