Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Serialization with id attribute
Serialization with id attribute [message #417975] Tue, 01 April 2008 08:23 Go to next message
Eclipse UserFriend
Originally posted by: messineo.rosario.gmail.com

Hi,

this post is a reply to a previous one that I haven't found more, why?

I've extended the XMIResourceImpl in my project and overrided two methods
in the following way:

@Override
protected boolean useIDAttributes() {
return false;
}

@Override
protected boolean useUUIDs() {
return true;
}

but when I use the Model Editor it doesn't serialize using id attribute
with a random sequence.
Have I to change other things?

Thanks

Rosario
Re: Serialization with id attribute [message #417983 is a reply to message #417975] Tue, 01 April 2008 11:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Rosario,

Comments below.

Rosario wrote:
> Hi,
>
> this post is a reply to a previous one that I haven't found more, why?
>
> I've extended the XMIResourceImpl in my project and overrided two
> methods in the following way:
>
> @Override
> protected boolean useIDAttributes() {
> return false;
> }
>
> @Override
> protected boolean useUUIDs() {
> return true;
> }
>
> but when I use the Model Editor it doesn't serialize using id
> attribute with a random sequence.
Is the model editor actually using your resource factory to create the
above resource implementation?
> Have I to change other things?
I did explain that you should register it; in fact, I explained how you
could modify the GenPackage's Resource Type property so that an
implementation and registration would be generated for it, but I'm not
sure you've done that...
>
> Thanks
> Rosario
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Serialization with id attribute [message #417991 is a reply to message #417983] Tue, 01 April 2008 14:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: messineo.rosario.gmail.com

Hi,

I've add the following extension point and now it works fine.

<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="spatel.util.XXXResourceFactoryImpl"
type="*">
</parser>
</extension>

Thanks

Rosario
Re: Serialization with id attribute [message #417993 is a reply to message #417991] Tue, 01 April 2008 14:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Rosario,

It's likely you'll kill the rest of the environment by making your
factory the default one for all extensions. :-(


Rosario wrote:
> Hi,
>
> I've add the following extension point and now it works fine.
>
> <extension
> point="org.eclipse.emf.ecore.extension_parser">
> <parser
> class="spatel.util.XXXResourceFactoryImpl"
> type="*">
> </parser>
> </extension>
>
> Thanks
>
> Rosario
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Workbench event loop stuck after EMF bulk update
Next Topic:new attribute to a class on my model
Goto Forum:
  


Current Time: Thu Apr 25 06:17:24 GMT 2024

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

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

Back to the top