Writing to model [message #152751] |
Mon, 01 October 2007 10:05  |
Eclipse User |
|
|
|
Originally posted by: kmcglinn.gmail.com
Hey Guys,
I notice that although I specify a label for my ecore attributes, it seems
that they will not be saved to the xmi file when I save the diagram. Is
there any way to force an xmi attribute to appear in the gmf file?
For example, lets say I have a transition between two nodes with an
attribute "condition"
-------
<containsActivities xsi:type="service:TransformationCondition"
source="//@containsSwimlanes.0/@containsActivities.2"
target="//@containsSwimlanes.0/@containsActivities.1" condition=".."/>
-------
If I had not entered ".." into the model I would not have got:
-------
<containsActivities xsi:type="service:TransformationCondition"
source="//@containsSwimlanes.0/@containsActivities.2"
target="//@containsSwimlanes.0/@containsActivities.1" condition=""/>
-------
But rather
-------
<containsActivities xsi:type="service:TransformationCondition"
source="//@containsSwimlanes.0/@containsActivities.2"
target="//@containsSwimlanes.0/@containsActivities.1"/>
-------
Which crashes my parser...any way to force the attribute to be created,
empty or not?
Thanks,
Guy.
|
|
|
Re: Writing to model [message #152761 is a reply to message #152751] |
Mon, 01 October 2007 10:09  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Guy,
EMF will only save attributes for which eIsSet is true so generally you
must set the value if you want it to be saved. If you use
XMLResource.OPTION_KEEP_DEFAULT_CONTENT as a save option, then features
with an explicit non-null default will serialize that default.
Guy Incognito wrote:
> Hey Guys,
>
> I notice that although I specify a label for my ecore attributes, it
> seems that they will not be saved to the xmi file when I save the
> diagram. Is there any way to force an xmi attribute to appear in the
> gmf file?
>
> For example, lets say I have a transition between two nodes with an
> attribute "condition"
> -------
> <containsActivities xsi:type="service:TransformationCondition"
> source="//@containsSwimlanes.0/@containsActivities.2"
> target="//@containsSwimlanes.0/@containsActivities.1" condition=".."/>
> -------
>
> If I had not entered ".." into the model I would not have got:
> -------
> <containsActivities xsi:type="service:TransformationCondition"
> source="//@containsSwimlanes.0/@containsActivities.2"
> target="//@containsSwimlanes.0/@containsActivities.1" condition=""/>
> -------
>
> But rather
> -------
> <containsActivities xsi:type="service:TransformationCondition"
> source="//@containsSwimlanes.0/@containsActivities.2"
> target="//@containsSwimlanes.0/@containsActivities.1"/>
> -------
>
> Which crashes my parser...any way to force the attribute to be
> created, empty or not?
>
> Thanks,
>
> Guy.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02952 seconds