Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Read-Only attributes persisted in model.uml and caused into error (Error is shown when loading a diagram with an element and its readonly attribute)
Read-Only attributes persisted in model.uml and caused into error [message #1162271] Wed, 30 October 2013 09:07 Go to next message
Erik Schondorff is currently offline Erik SchondorffFriend
Messages: 25
Registered: October 2013
Junior Member
Hi Christian Smile,

I just thought, if the attribute is read-only, there would be exist an automated process that a read-only attribute would not be persisted, or, that it would not be read from the *.uml file.
The attribute is persisted like every other attribute of the class. Maybe I can try the volatile-property for an attribute.

So, I wrote this topic to the EMF-Community:

But at all, thanks for help Smile

Best regards, Erik

[Updated on: Wed, 30 October 2013 14:38]

Report message to a moderator

Re: Read-Only attributes persisted in model.uml and caused into error [message #1162560 is a reply to message #1162271] Wed, 30 October 2013 13:15 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1221
Registered: July 2009
Location: Canada
Senior Member

Hi, Erik,

The Eclipse implementation of the UML metamodel handles such cases
within its resource implementation.

Is this an attribute in a model of your own devising? How does it end
up being persisted in a *.uml file? This may be difficult to fix
because the UMLResource has to be used to load the UML file, so you
cannot use your own resource implementation.

And how did you end up with a serialization that has values for a
read-only attribute? I would expect that to be derived and transient
in the *.ecore. If this is a result of model evolution (the attribute
was writable in a previous version of the ecore but is not now) then
you may be able to use EMF's Ecore2Ecore mappings to handle migration,
but I don't know much about that.

In any case, I think this question is really an EMF question and will
probably find the best help on the EMF forum.



On 2013-10-30 09:07:39 +0000, Erik Schondorff said:

> Hello community,
> I have a read-only attribute defined in my *.ecore model, so it has no
> setAttribute - method in the corresponding *
> This causes in an error when loading a diagram, which has a model
> element with its read-only attribute because the attribute is persisted
> in the model.uml and the setAttribut-method does not exists. What can I
> do, when a read-only attribute should not be persisted in the model.uml?
> Thanks in advance.
> Erik :)
Previous Topic:PAPYRUS 0.10.X & ALF EDITOR
Next Topic:Cannot display icons for specialized stereotype
Goto Forum:

Current Time: Sun Nov 29 21:53:16 GMT 2020

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

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

Back to the top