Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Some duvids about GMF model format
Some duvids about GMF model format [message #790965] Sat, 04 February 2012 23:04 Go to next message
Eclipse UserFriend
I have two diferents GMF editor but the format of the generated model are diferents,
for example, with the GMF editor 1 the format generated is:

<contents xsi:type="XXX" name="NAME_X" id="ID" .../>
<contents xsi:type="YYY" name="NAME_Y" ...>
    <xxxs xxx_name="X" xxxType="//@contents.0/>
</contents>
[...]


and the GMF editor 2 the format generated is like:

<XXX name="NAME_X" id="ID" .../>
<YYY name="NAME_Y" ...>
    <xxxs xxx_name="X">
</YYY>
[...]


The first editor was made by a third person e the second was made by myself. My duvid is why in the first appear <contents xsi:type ... > and in the second not? Another duvid is, how I can change the references in the second format to became as the first (using //@contents.0 .. and not just a inner node)?
Re: Some duvids about GMF model format [message #791041 is a reply to message #790965] Sun, 05 February 2012 02:00 Go to previous messageGo to next message
Eclipse UserFriend
Comments below.

On 05/02/2012 5:04 AM, Missing name Mising name wrote:
> I have two diferents GMF editor but the format of the generated model
> are diferents,
> for example, with the GMF editor 1 the format generated is:
>
>
> <contents xsi:type="XXX" name="NAME_X" id="ID" .../>
So this is an instance of XXX contained by something that has a
"contents" containment reference.
> <contents xsi:type="YYY" name="NAME_Y" ...>
> <xxxs xxx_name="X" xxxType="//@contents.0/>
> </contents>
> [...]
>
>
> and the GMF editor 2 the format generated is like:
>
>
> <XXX name="NAME_X" id="ID" .../>
This is an instance of XXX right at the root of the resource.
> <YYY name="NAME_Y" ...>
> <xxxs xxx_name="X">
> </YYY>
> [...]
>
>
> The first editor was made by a third person e the second was made by
> myself. My duvid is why in the first appear <contents xsi:type ... >
> and in the second not?
At the root, the type name is used as an element name. Anywhere below
that, the name of the containment reference is used as the element name
and if the object is not of the type of the containment reference but
rather a derived type, then that information needs to be in the XML as
well, via the xsi:/xmi:type.
> Another duvid is, how I can change the references in the second format
> to became as the first (using //@contents.0 .. and not just a inner
> node)?
Embed the objects in whatever has that "contents" reference or something
else with such a "contents" reference.
Re: Some duvids about GMF model format [message #791341 is a reply to message #791041] Sun, 05 February 2012 12:22 Go to previous messageGo to next message
Eclipse UserFriend
so how I can change my model format to use xsi/xmi:type?

Re: Some duvids about GMF model format [message #791434 is a reply to message #791041] Sun, 05 February 2012 15:30 Go to previous message
Eclipse UserFriend
Did you see the the part where I explained when and why there is an
xsi:type?

On 05/02/2012 8:00 AM, Ed Merks wrote:
> Comments below.
>
> On 05/02/2012 5:04 AM, Missing name Mising name wrote:
>> I have two diferents GMF editor but the format of the generated model
>> are diferents,
>> for example, with the GMF editor 1 the format generated is:
>>
>>
>> <contents xsi:type="XXX" name="NAME_X" id="ID" .../>
> So this is an instance of XXX contained by something that has a
> "contents" containment reference.
>> <contents xsi:type="YYY" name="NAME_Y" ...>
>> <xxxs xxx_name="X" xxxType="//@contents.0/>
>> </contents>
>> [...]
>>
>>
>> and the GMF editor 2 the format generated is like:
>>
>>
>> <XXX name="NAME_X" id="ID" .../>
> This is an instance of XXX right at the root of the resource.
>> <YYY name="NAME_Y" ...>
>> <xxxs xxx_name="X">
>> </YYY>
>> [...]
>>
>>
>> The first editor was made by a third person e the second was made by
>> myself. My duvid is why in the first appear <contents xsi:type ... >
>> and in the second not?
> At the root, the type name is used as an element name. Anywhere below
> that, the name of the containment reference is used as the element
> name and if the object is not of the type of the containment reference
> but rather a derived type, then that information needs to be in the
> XML as well, via the xsi:/xmi:type.
>> Another duvid is, how I can change the references in the second
>> format to became as the first (using //@contents.0 .. and not just a
>> inner node)?
> Embed the objects in whatever has that "contents" reference or
> something else with such a "contents" reference.
Previous Topic:[solved]How get and set features values on drag and drop ?
Next Topic:Grouping Nodes and defining property for the group
Goto Forum:
  


Current Time: Fri Aug 08 12:38:49 EDT 2025

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

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

Back to the top