[gme-users] Problems with <<EnumAttribute>> in a Multi-User project

Rico Steiner Rico.Steiner at hevs.ch
Fri Mar 23 09:06:21 CST 2007


Hello everybody

We are currently working on a multi-user project using GME 6.11.9. We don’t use Visual SourceSafe nor Rational ClearCase. In fact we just want the project to be stored in xml files in order to manage them using Subversion for versioning.

There is an attribute of the stereotype <<EnumAttribute>> called  RoutingMethod in our metamodel with several entries (HSLS, AODV, PWRP, DSR, B.A.T.M.A.N.). Each of them is on a new line of the RoutingMethod's attribute “Menu items”. When saving the project, the attribute is written as follow into the xml file.

<Atom MetaId="102" Id="35ffb26a4da14e41b8b494f12f92d6cf" Name="RoutingMethod" Meta="1076" RoleMeta="1176" RelID="12" GUID1="1771831426" GUID2="-1916583929" GUID3="-2037865249" GUID4="85358609" Permissions="0">
	<StrAttr MetaId="111" Id="63a7a4b736af064cb0bb8aa011474b36" Meta="1053" StrValue="Routing Method:"></StrAttr>
	<StrAttr MetaId="111" Id="2c0fb459a8be124f992bbacd0703d9da" Meta="1025" StrValue="HSLS"></StrAttr>
	<StrAttr MetaId="111" Id="17710f2115060f4e8e5c89e885452216" Meta="1047" StrValue="HSLS
AODV
PWRP
DSR
B.A.T.M.A.N.">
	</StrAttr>
	<RegNode MetaId="121" Id="796f8b7eaa8e7140aa82a938f47652ae" Name="PartRegs" RegistryFlags="0">
		<RegNode MetaId="121" Id="4e7b5fc7e75fcd47b7c54c494947508c" Name="Attributes" RegistryFlags="0">
			<RegNode MetaId="121" Id="f12267058e853e498b611d618e349af7" Name="Position" RegNodeValue="716,219" RegistryFlags="3"></RegNode>
		</RegNode>
	</RegNode>
</Atom>

When registering the paradigm, the generated .xmp file contains the following tags as expected:

<attrdef name="RoutingMethod" metaref = "1136" valuetype = "enum" defvalue = "1">
<dispname>Routing Method:</dispname>
	<enumitem dispname = "HSLS" value = "1"></enumitem>
	<enumitem dispname = "AODV" value = "2"></enumitem>
	<enumitem dispname = "PWRP" value = "3"></enumitem>
	<enumitem dispname = "DSR" value = "4"></enumitem>
	<enumitem dispname = "B.A.T.M.A.N." value = "5"></enumitem>
</attrdef>


So far so good. The trouble begins, when we close our meta model and when reopening it. Now all items of the attribute RoutingMethod occur on the same line. Storing the project and re-examine the xml file gives the following result:

<Atom MetaId="102" Id="35ffb26a4da14e41b8b494f12f92d6cf" Name="RoutingMethod" Meta="1076" RoleMeta="1176" RelID="12" GUID1="1771831426" GUID2="-1916583929" GUID3="-2037865249" GUID4="85358609" Permissions="0">
	<StrAttr MetaId="111" Id="63a7a4b736af064cb0bb8aa011474b36" Meta="1053" StrValue="Routing Method:"></StrAttr>
	<StrAttr MetaId="111" Id="2c0fb459a8be124f992bbacd0703d9da" Meta="1025" StrValue="HSLS"></StrAttr>
	<StrAttr MetaId="111" Id="17710f2115060f4e8e5c89e885452216" Meta="1047" StrValue="HSLS AODV PWRP DSR B.A.T.M.A.N."></StrAttr>
	<RegNode MetaId="121" Id="796f8b7eaa8e7140aa82a938f47652ae" Name="PartRegs" RegistryFlags="0">
		<RegNode MetaId="121" Id="4e7b5fc7e75fcd47b7c54c494947508c" Name="Attributes" RegistryFlags="0">
			<RegNode MetaId="121" Id="f12267058e853e498b611d618e349af7" Name="Position" RegNodeValue="715,237" RegistryFlags="3"></RegNode>
		</RegNode>
	</RegNode>
</Atom>

All items of the attribute are on the same line as well. When registering the paradigm, all items are interpreted as a single one:

<attrdef name="RoutingMethod" metaref = "1136" valuetype = "enum" defvalue = "HSLS AODV PWRP DSR B.A.T.M.A.N.">
<dispname>Routing Method:</dispname>
	<enumitem dispname = "HSLS AODV PWRP DSR B.A.T.M.A.N." value = "HSLS AODV PWRP DSR B.A.T.M.A.N."></enumitem>
</attrdef>

Can someone of you reproduce this behaviour? Do you have any suggestions to work around this problem? Can we use a special character to separated items in order to get them interpreted correctly?

Best regards
Rico




More information about the gme-users mailing list