Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link ending in a compartment
Link ending in a compartment [message #226188] Wed, 15 April 2009 12:15 Go to next message
Eclipse UserFriend
Originally posted by: kalin.nakov.gmail.com

Greetings,

I have some symbols which have compartments. The generated GMF editor does
not allow me neither to start, nor to end a link on a symbol's compartment.
I can do this only if I start or end the link on the symbol's title area.
Where should I modify the generated code so that the compartment can become
a valid link source & target?

Thanks in advance,
Kalin
Re: Link ending in a compartment [message #226212 is a reply to message #226188] Wed, 15 April 2009 12:41 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Kalin,

You have to implement <Compartment>ItemSemanticEditPolicy.getCreateRelationshipCommand()
method.

-----------------
Alex Shatalin
Re: Link ending in a compartment [message #226398 is a reply to message #226212] Thu, 16 April 2009 12:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kalin.nakov.gmail.com

Hello again,

I have added the needed code, but no breakpoint was hit in the new code.
Then I have modified the getCommand() method of my compartment's
CreationEditPolicy() by converting the
CreateUnspecifiedTypeConnectionRequest to CreateRelationshipRequest and
passing it to the new compartment's getCreateRelationshipCommand() method.
This created the appropriate creation command for my link. Unfortunately the
cursor changed to a Hand cursor (ConnectionCreationTool.calculateCursor())
and creation of a link was impossible. As I see from the GMF source code,
there is a special handling when drawing links to/from a compartment which I
want to remove. Can you advise me how to continue with this?

Thanks in advance,
Kalin

"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e62c2658cb8c00331d287c@news.eclipse.org...
> Hello Kalin,
>
> You have to implement
> <Compartment>ItemSemanticEditPolicy.getCreateRelationshipCommand() method.
>
> -----------------
> Alex Shatalin
>
>
Re: Link ending in a compartment [message #226403 is a reply to message #226398] Thu, 16 April 2009 12:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

Hello Kalin and Alex,

I have another suggestion: I think it would be cool if the popup-box for
selecting an element type to create or an existing element, that appears
when ending a connection on top of a compartment, could be given another
line: "create connection to this element". Alex, can you tell me where
I'd have to look in order to add this feature?

Regards,
tobias


Kalin Nakov schrieb:
> Hello again,
>
> I have added the needed code, but no breakpoint was hit in the new code.
> Then I have modified the getCommand() method of my compartment's
> CreationEditPolicy() by converting the
> CreateUnspecifiedTypeConnectionRequest to CreateRelationshipRequest and
> passing it to the new compartment's getCreateRelationshipCommand() method.
> This created the appropriate creation command for my link. Unfortunately
> the
> cursor changed to a Hand cursor (ConnectionCreationTool.calculateCursor())
> and creation of a link was impossible. As I see from the GMF source code,
> there is a special handling when drawing links to/from a compartment
> which I
> want to remove. Can you advise me how to continue with this?
>
> Thanks in advance,
> Kalin
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e62c2658cb8c00331d287c@news.eclipse.org...
>> Hello Kalin,
>>
>> You have to implement
>> <Compartment>ItemSemanticEditPolicy.getCreateRelationshipCommand()
>> method.
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
Re: Link ending in a compartment [message #226410 is a reply to message #226403] Thu, 16 April 2009 13:21 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello tobias,

I've just tried to reproduce this problem with ecore diagram example from
CVS:
- I have two classes one contains a number of attributes.
- I'm trying to create association link from one class to another one and
drag this link above attributes compartment.
It is possible to create this link by dropping mouse there.. So, are you
sure you are using latest GMF to generate code? Can you provide me with the
steps to repeat this problem on ecore example?

-----------------
Alex Shatalin
Re: Link ending in a compartment [message #226531 is a reply to message #226410] Fri, 17 April 2009 09:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

Hello Alex,

you are right, it works in the Ecore diagram editor, but this is because
these compartments have a list layout. I tried it in my diagram editor,
and for those compartments that have a list layout (in my case, a BPMN
pool) links can be ended ontop of the compartment, while for
compartments with an XY layout (e.g. BPMN subprocess) they can not.

There seem to be some other curious differences between these two types
of compartments I wasn't aware of until now. E.g., it seems that in a
figure with a list layout compartment you can drop a new element from
the palette on the label, while for an XY layout compartment you have to
target the compartment itself (makes sense, as in the latter case the
figure needs some coordinates). I think I'll try to investigate the
differences between these two types of compartments in my diagram code.

Regards,
Tobias


Alex Shatalin schrieb:
> Hello tobias,
>
> I've just tried to reproduce this problem with ecore diagram example
> from CVS:
> - I have two classes one contains a number of attributes.
> - I'm trying to create association link from one class to another one
> and drag this link above attributes compartment.
> It is possible to create this link by dropping mouse there.. So, are you
> sure you are using latest GMF to generate code? Can you provide me with
> the steps to repeat this problem on ecore example?
>
> -----------------
> Alex Shatalin
>
>
Re: Link ending in a compartment [message #226538 is a reply to message #226531] Fri, 17 April 2009 09:26 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello tobias,

> you are right, it works in the Ecore diagram editor, but this is
> because these compartments have a list layout. I tried it in my
Sounds reasonable. With list layout it is impossible to create link to a
child element (XY-layouted compartment allows this).

> figure needs some coordinates). I think I'll try to investigate the
> differences between these two types of compartments in my diagram
> code.
It was exectly my suggestion. ;-) If you in the end came to an idea that
it is reasonable to generate this code based on some property from .gmfgen
model (newly added one - like .areChildLinksAllowed) - just file a bugzilla.

-----------------
Alex Shatalin
Re: Link ending in a compartment [message #226577 is a reply to message #226538] Fri, 17 April 2009 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kalin.nakov.gmail.com

Hello,

My situation is similar. I am trying to end a link on a XY layout
compartment. The problem is that I have a compartment with child elements
with infinite level of nesting so disabling child links is not an option for
my application :-( The optimal solution for me would be to accept the link
if the link is ended on the free space between the child items in the XY
layout compartment.

Cheers,
Kalin

"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e62c3788cb8d773b99e49d@news.eclipse.org...
> Hello tobias,
>
>> you are right, it works in the Ecore diagram editor, but this is
>> because these compartments have a list layout. I tried it in my
> Sounds reasonable. With list layout it is impossible to create link to a
> child element (XY-layouted compartment allows this).
>
>> figure needs some coordinates). I think I'll try to investigate the
>> differences between these two types of compartments in my diagram
>> code.
> It was exectly my suggestion. ;-) If you in the end came to an idea that
> it is reasonable to generate this code based on some property from .gmfgen
> model (newly added one - like .areChildLinksAllowed) - just file a
> bugzilla.
>
> -----------------
> Alex Shatalin
>
>
Re: Link ending in a compartment [message #234128 is a reply to message #226577] Thu, 18 June 2009 15:54 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Kalin,
Hi Alex,
Hi Tobias,

I want to have the same feature as you want Kalin but without infinite
level, I want node which have links on elements in Compartement of other
Nodes (these nodes are similar to UMLClass with Property in Compartement).
If I set "List Layout" in my gmfgen to false, my compartment elements
disappears.
Alex, Tobias, you have said that with EcoreTools, we can add links to
elements in Compartement, I suppose you talk about Package node?

I would like to add link ending to property like in UMLClass with a
StackLayout in my gmfgraph.
How can do it?
Re: Link ending in a compartment [message #234193 is a reply to message #234128] Fri, 19 June 2009 08:33 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Esteban,

> If I set "List Layout" in my gmfgen to false, my compartment elements
> disappears.
This is strange.

> I would like to add link ending to property like in UMLClass with a
If you need to create links to child elements inside a compartment (this
question is a bit different from the original one) then you have to create
composite figure in .gmfgraph model for this child element. By composite
figure I mean rectangle with labels in it, appropriate accessors to these
labels, Diagram Node and Diagram labels referencing created FigureDescriptor
+ accessors (for labels) and finally use these elements in child node mapping
- point to the corresponding DiagramNode/Labels in child NodeMapping/FeatureLabelMappings.


-----------------
Alex Shatalin
Re: Link ending in a compartment [message #234235 is a reply to message #234193] Fri, 19 June 2009 10:10 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040205020707060202060707
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Alex,

Thanks, now I can see my properties (like in attached screenshot) and
end link to them. Now I would like to hide rectangle and layout my
properties normally like uml2tools do with ClassFigure. I have set a
StackLayout on my Compartment.

Also where can I find semantic description of all GMF metamodels
(gmfgraph, gmfmap, ...)? GMF Javadoc doesn't contains metamodels
diagrams like in EMF Javadoc.

Thanks Alex.

Alex Shatalin a écrit :
> Hello Esteban,
>
>> If I set "List Layout" in my gmfgen to false, my compartment elements
>> disappears.
> This is strange.
>
>> I would like to add link ending to property like in UMLClass with a
> If you need to create links to child elements inside a compartment (this
> question is a bit different from the original one) then you have to
> create composite figure in .gmfgraph model for this child element. By
> composite figure I mean rectangle with labels in it, appropriate
> accessors to these labels, Diagram Node and Diagram labels referencing
> created FigureDescriptor + accessors (for labels) and finally use these
> elements in child node mapping - point to the corresponding
> DiagramNode/Labels in child NodeMapping/FeatureLabelMappings.
>
>
> -----------------
> Alex Shatalin
>
>


--------------040205020707060202060707
Content-Type: image/gif;
name="businessModelEntity2ValueObject.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="businessModelEntity2ValueObject.gif"

R0lGODlhmwCSAPf/AP///7CwsAAAAHCgxE+Dtk2AtE1/s0x+sVCEtuHp9Ojv 9+zy+fD1+vX4
/Pr7/f39/kt9sFCEt0t9sUp9sU+Et0+Ft1CFt0p9sE6DtU6BtEx/s0t+sgAA AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAA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MZYtByu8IHiax1XjEjHJFoQf1whTP82JkeNATItjnTX/A4ZyTMKciuE hGAXGxkpSW5S
WplUoCEjuRFLkhKOlCzlKU2Jl8OB8JX9g+XhQMLKUxbykbaM4yRzCcld8rJ4 gfzlH1MpTF1+
spi9PCYygZnMZTYylKvkpDOlOMppBlOZ1tRkNbPJzKtwE5ui/GYzcSnOWxKz nKi8Jjq76ZZ0
ufOd8IynUdZJz3ra8574DMynPvfJz3760yYBAQA7
--------------040205020707060202060707
Content-Type: text/xml;
name="Entity2ValueObject.gmfgraph"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Entity2ValueObject.gmfgraph"

<?xml version="1.0" encoding="UTF-8"?>
<gmfgraph:Canvas xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gmfgraph="http://www.eclipse.org/gmf/2006/GraphicalDefinition" name="entity2valueObject">
<figures
name="Default">
<figures
xsi:type="gmfgraph:PolylineDecoration"
name="Fleche"/>
<descriptors
name="DTOFigure">
<actualFigure
xsi:type="gmfgraph:Rectangle"
name="DTOFigure">
<layout
xsi:type="gmfgraph:FlowLayout"
vertical="true"
matchMinorSize="true"
forceSingleLine="true"
minorAlignment="CENTER"
majorSpacing="0"
minorSpacing="0"/>
<insets
top="1"
left="1"
bottom="10"
right="1"/>
<children
xsi:type="gmfgraph:CustomFigure"
name="DTOFigure_nameAndStereotype"
qualifiedClassName=" com.miasoftware.miastudio.mapping.diagram.draw2d.NameAndSter eotypeBlock ">
<insets
top="8"
left="5"
bottom="6"
right="5"/>
</children>
<children
xsi:type="gmfgraph:Label"
name="DTOStereotypeNameFigure"
text="&lt;...>"/>
<children
xsi:type="gmfgraph:Label"
name="DTONameFigure"
text="&lt;...>"/>
<children
xsi:type="gmfgraph:Rectangle"
name="DTOFigure_PropertiesCompartment"
outline="false">
<layout
xsi:type="gmfgraph:CustomLayout"
qualifiedClassName="org.eclipse.draw2d.StackLayout"/>
</children>
</actualFigure>
<accessors
accessor="getFigureDTOStereotypeName"
figure="//@figures.0/@descriptors.0/@actualFigure/@children.1 "/>
<accessors
figure="//@figures.0/@descriptors.0/@actualFigure/@children.2 "/>
<accessors
accessor="getFigureDTOAttributes"
figure="//@figures.0/@descriptors.0/@actualFigure/@children.3 "/>
</descriptors>
<descriptors
name="EntityProxyFigure">
<actualFigure
xsi:type="gmfgraph:Rectangle"
name="EntityProxyFigure">
<layout
xsi:type="gmfgraph:FlowLayout"
vertical="true"
matchMinorSize="true"
forceSingleLine="true"
minorAlignment="CENTER"
majorSpacing="0"
minorSpacing="0"/>
<insets
top="1"
left="1"
bottom="10"
right="1"/>
<children
xsi:type="gmfgraph:CustomFigure"
name="EntityFigure_nameAndStereotype"
qualifiedClassName=" com.miasoftware.miastudio.mapping.diagram.draw2d.NameAndSter eotypeBlock ">
<insets
top="8"
left="5"
bottom="6"
right="5"/>
<customChildren
accessor="getNameAndStereotypeBlock().getStereotypeLabel()" >
<typedFigure
xsi:type="gmfgraph:CustomFigure"
name="EntityFigure_stereo"
qualifiedClassName=" com.miasoftware.miastudio.mapping.diagram.draw2d.StereotypeL abel2 ">
<font
xsi:type="gmfgraph:BasicFont"/>
</typedFigure>
</customChildren>
<customChildren
accessor="getNameAndStereotypeBlock().getNameLabel()">
<typedFigure
xsi:type="gmfgraph:CustomFigure"
name="EntityFigure_name"
qualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel ">
<font
xsi:type="gmfgraph:BasicFont"/>
</typedFigure>
</customChildren>
</children>
<children
xsi:type="gmfgraph:Rectangle"
name="EntityFigure_PropertiesCompartment"
outline="false">
<layout
xsi:type="gmfgraph:StackLayout"/>
<border
xsi:type="gmfgraph:MarginBorder">
<insets
top="5"
left="5"
bottom="5"
right="5"/>
</border>
</children>
</actualFigure>
<accessors
accessor="getFigureEntityStereotypeLabel"
figure=" //@figures.0/@descriptors.1/@actualFigure/@children.0/@custo mChildren.0/@typedFigure "/>
<accessors
accessor="getFigureEntityNameLabel"
figure=" //@figures.0/@descriptors.1/@actualFigure/@children.0/@custo mChildren.1/@typedFigure "/>
<accessors
accessor="getFigureEntityAttributesFigure"
figure="//@figures.0/@descriptors.1/@actualFigure/@children.1 "/>
<accessors
accessor="getNameAndStereotypeBlock"
figure="//@figures.0/@descriptors.1/@actualFigure/@children.0 "/>
</descriptors>
<descriptors
name="DTOMasterLinkFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:PolylineConnection"
lineKind="LINE_DASHDOTDOT"
targetDecoration="//@figures.0/@figures.0"/>
</descriptors>
<descriptors
name="DTOSlaveLinkFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:PolylineConnection"
lineKind="LINE_DASHDOTDOT"
targetDecoration="//@figures.0/@figures.0"/>
</descriptors>
<descriptors
name="dtoPropertyLink">
<actualFigure
xsi:type="gmfgraph:PolylineConnection"
lineKind="LINE_DASHDOT"
targetDecoration="//@figures.0/@figures.0"/>
</descriptors>
<descriptors
name="dtoMasterLinkDiagramLabelFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:Label"
name="dtoMasterLink"
text="dtoMasterLink"/>
</descriptors>
<descriptors
name="dtoSlaveLinksDiagramLabelFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:Label"
name="dtoSlaveLink"
text="dtoSlaveLink"/>
</descriptors>
<descriptors
name="dtoPropertyLinkDiagramLabelFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:Label"
name="dtoPropertyLink"
text="dtoPropertyLink"/>
</descriptors>
<descriptors
name="PropertyFigureDescriptor">
<actualFigure
xsi:type="gmfgraph:Rectangle"
lineWidth="0"
lineKind="LINE_DOT">
<minimumSize
dx="20"
dy="20"/>
<children
xsi:type="gmfgraph:Label"
name="PropertyLabel">
<layout
xsi:type="gmfgraph:FlowLayout"
vertical="true"
matchMinorSize="true"
forceSingleLine="true"
majorSpacing="0"
minorSpacing="0"/>
<insets
top="1"
left="1"
bottom="10"
right="1"/>
</children>
</actualFigure>
<accessors
figure="//@figures.0/@descriptors.8/@actualFigure/@children.0 "/>
</descriptors>
</figures>
<nodes
name="EntityProxy"
figure="EntityProxyFigure">
<facets
xsi:type="gmfgraph:DefaultSizeFacet">
<defaultSize
dx="100"
dy="60"/>
</facets>
</nodes>
<nodes
name="DTO"
figure="DTOFigure">
<facets
xsi:type="gmfgraph:DefaultSizeFacet">
<defaultSize
dx="100"
dy="60"/>
</facets>
</nodes>
<nodes
name="Property"
figure="PropertyFigureDescriptor"/>
<connections
name="DTOMasterLinkConnection"
figure="DTOMasterLinkFigureDescriptor"/>
<connections
name="DTOSlaveLinkConnection"
figure="DTOSlaveLinkFigureDescriptor"/>
<connections
name="DTOPropertyLinkConnection"
figure="dtoPropertyLink"/>
<compartments
name="EntityAttributes"
figure="EntityProxyFigure"
accessor="//@figures.0/@descriptors.1/@accessors.2"/>
<compartments
name="DTOAttributes"
figure="DTOFigure"
accessor="//@figures.0/@descriptors.0/@accessors.2"/>
<labels
name="dtoMasterLinkDiagramLabel"
figure="dtoMasterLinkDiagramLabelFigureDescriptor"/>
<labels
name="dtoSlaveLinksDiagramLabel"
figure="dtoSlaveLinksDiagramLabelFigureDescriptor"/>
<labels
name="dtoPropertyLinkDiagramLabel"
figure="dtoPropertyLinkDiagramLabelFigureDescriptor"/>
<labels
name="DTOName"
figure="DTOFigure"
accessor="//@figures.0/@descriptors.0/@accessors.1"/>
<labels
name="DTOStereotypeName"
figure="DTOFigure"
accessor="//@figures.0/@descriptors.0/@accessors.0"/>
<labels
name="EntityName"
figure="EntityProxyFigure"
accessor="//@figures.0/@descriptors.1/@accessors.1"/>
<labels
name="EntityStereotypeName"
figure="EntityProxyFigure"
elementIcon="false"
accessor="//@figures.0/@descriptors.1/@accessors.0"/>
<labels
name="PropertyName"
figure="PropertyFigureDescriptor"
affixedParentSide="WEST"
elementIcon="false"
accessor="//@figures.0/@descriptors.8/@accessors.0"/>
</gmfgraph:Canvas>

--------------040205020707060202060707
Content-Type: text/xml;
name="Entity2ValueObject.gmfmap"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Entity2ValueObject.gmfmap"

<?xml version="1.0" encoding="UTF-8"?>
<gmfmap:Mapping xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<containmentFeature
href="Entity2ValueObject.ecore#//Mapping/entities"/>
<ownedChild>
<domainMetaElement
href="Entity2ValueObject.ecore#//EntityProxy"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Entity2ValueObject.gmfgraph#EntityStereotypeName"/>
<features
href="Entity2ValueObject.ecore#//EntityProxy/stereotypeName "/>
</labelMappings>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Entity2ValueObject.gmfgraph#EntityName"/>
<features
href="Entity2ValueObject.ecore#//EntityProxy/name"/>
</labelMappings>
<diagramNode
href="Entity2ValueObject.gmfgraph#EntityProxy"/>
<children
compartment="//@nodes.0/@ownedChild/@compartments.0">
<containmentFeature
href="Entity2ValueObject.ecore#//EntityProxy/properties"/>
<ownedChild>
<domainMetaElement
href="Entity2ValueObject.ecore#//PropertyProxy"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
readOnly="true"
viewPattern="{0} {1} : {2}">
<diagramLabel
href="Entity2ValueObject.gmfgraph#PropertyName"/>
<features
href="Entity2ValueObject.ecore#//PropertyProxy/stereotypeName "/>
<features
href="Entity2ValueObject.ecore#//PropertyProxy/name"/>
<features
href="Entity2ValueObject.ecore#//PropertyProxy/type"/>
</labelMappings>
<diagramNode
href="Entity2ValueObject.gmfgraph#Property"/>
</ownedChild>
</children>
<compartments
children="//@nodes.0/@ownedChild/@children.0">
<compartment
href="Entity2ValueObject.gmfgraph#EntityAttributes"/>
</compartments>
</ownedChild>
</nodes>
<nodes>
<containmentFeature
href="Entity2ValueObject.ecore#//Mapping/dtos"/>
<ownedChild>
<domainMetaElement
href="Entity2ValueObject.ecore#//DTO"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Entity2ValueObject.gmfgraph#DTOStereotypeName"/>
<features
href="Entity2ValueObject.ecore#//Target/stereotypeName"/>
</labelMappings>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping">
<diagramLabel
href="Entity2ValueObject.gmfgraph#DTOName"/>
<features
href="Entity2ValueObject.ecore#//Target/name"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="Entity2ValueObject.gmftool#//@palette/@tools.0/@tools.2 "/>
<diagramNode
href="Entity2ValueObject.gmfgraph#DTO"/>
<children
compartment="//@nodes.1/@ownedChild/@compartments.0">
<containmentFeature
href="Entity2ValueObject.ecore#//Target/properties"/>
<ownedChild>
<domainMetaElement
href="Entity2ValueObject.ecore#//PropertyProxy"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="{0} {1} : {2}">
<diagramLabel
href="classDiagram_auxiliary.gmfgraph#AuxiliaryPureLabel"/ >
<features
href="Entity2ValueObject.ecore#//PropertyProxy/stereotypeName "/>
<features
href="Entity2ValueObject.ecore#//PropertyProxy/name"/>
<features
href="Entity2ValueObject.ecore#//PropertyProxy/type"/>
</labelMappings>
<diagramNode
href="classDiagram_auxiliary.gmfgraph#AuxiliaryPureLabel"/ >
</ownedChild>
</children>
<compartments
children="//@nodes.1/@ownedChild/@children.0">
<compartment
href="Entity2ValueObject.gmfgraph#DTOAttributes"/>
</compartments>
</ownedChild>
</nodes>
<links>
<domainMetaElement
href="Entity2ValueObject.ecore#//DTOMasterLink"/>
<labelMappings
xsi:type="gmfmap:DesignLabelMapping"
readOnly="true">
<diagramLabel
href="Entity2ValueObject.gmfgraph#dtoMasterLinkDiagramLabel "/>
</labelMappings>
<containmentFeature
href="Entity2ValueObject.ecore#//Mapping/links"/>
<tool
xsi:type="gmftool:CreationTool"
href="Entity2ValueObject.gmftool#//@palette/@tools.0/@tools.0 "/>
<diagramLink
href="Entity2ValueObject.gmfgraph#DTOMasterLinkConnection"/ >
<sourceMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//DTOMasterLink/owner"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//FromEntityLink/entity"/>
</links>
<links>
<domainMetaElement
href="Entity2ValueObject.ecore#//DTOSlaveLink"/>
<labelMappings
xsi:type="gmfmap:DesignLabelMapping"
readOnly="true">
<diagramLabel
href="Entity2ValueObject.gmfgraph#dtoSlaveLinksDiagramLabel "/>
</labelMappings>
<containmentFeature
href="Entity2ValueObject.ecore#//Mapping/links"/>
<tool
xsi:type="gmftool:CreationTool"
href="Entity2ValueObject.gmftool#//@palette/@tools.0/@tools.1 "/>
<diagramLink
href="Entity2ValueObject.gmfgraph#DTOSlaveLinkConnection"/ >
<sourceMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//DTOSlaveLink/owner"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//FromEntityLink/entity"/>
</links>
<links>
<domainMetaElement
href="Entity2ValueObject.ecore#//PropertyLink"/>
<labelMappings
xsi:type="gmfmap:DesignLabelMapping"
readOnly="true">
<diagramLabel
href="Entity2ValueObject.gmfgraph#dtoPropertyLinkDiagramLabel "/>
</labelMappings>
<containmentFeature
href="Entity2ValueObject.ecore#//Mapping/links"/>
<tool
xsi:type="gmftool:CreationTool"
href="Entity2ValueObject.gmftool#//@palette/@tools.0/@tools.3 "/>
<diagramLink
href="Entity2ValueObject.gmfgraph#DTOPropertyLinkConnection "/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//PropertyLink/owner"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="Entity2ValueObject.ecore#//PropertyLink/propertyProxy "/>
</links>
<diagram>
<diagramCanvas
href="Entity2ValueObject.gmfgraph#entity2valueObject"/>
<domainModel
href="Entity2ValueObject.ecore#/"/>
<domainMetaElement
href="Entity2ValueObject.ecore#//Mapping"/>
<palette
href="Entity2ValueObject.gmftool#//@palette"/>
</diagram>
</gmfmap:Mapping>

--------------040205020707060202060707
Content-Type: text/xml;
name="Entity2ValueObject.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Entity2ValueObject.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="entity2valueObject"
nsURI="http://www.miasoftware.com/projects/mda/agl/mapping/model" nsPrefix="entity2valueObject">
<eClassifiers xsi:type="ecore:EClass" name="Mapping">
<eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
eType="#//Link" containment="true" eOpposite="#//Link/mapping"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="entities" upperBound="-1"
eType="#//EntityProxy" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dtos" upperBound="-1" eType="#//DTO"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Link" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="mapping" eType="#//Mapping"
eOpposite="#//Mapping/links"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PropertyLink" eSuperTypes="#//Link">
<eStructuralFeatures xsi:type="ecore:EReference" name="propertyProxy" lowerBound="1"
eType="#//PropertyProxy"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//DTO"
eOpposite="#//DTO/propertyLinks"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="MatchLink" eSuperTypes="#//PropertyLink"/>
<eClassifiers xsi:type="ecore:EClass" name="TransfoLink" eSuperTypes="#//PropertyLink"/>
<eClassifiers xsi:type="ecore:EClass" name="DTOLink" eSuperTypes="#//FromEntityLink"/>
<eClassifiers xsi:type="ecore:EClass" name="DAOLink" eSuperTypes="#//FromEntityLink">
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//DAO"
eOpposite="#//DAO/daoLinks"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ServiceLink" eSuperTypes="#//FromEntityLink">
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//Service"
eOpposite="#//Service/serviceLinks"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FromEntityLink" eSuperTypes="#//Link">
<eStructuralFeatures xsi:type="ecore:EReference" name="entity" lowerBound="1"
eType="#//EntityProxy"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DTOMasterLink" eSuperTypes="#//DTOLink">
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//DTO"
eOpposite="#//DTO/dtoMasterLink"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DTOSlaveLink" eSuperTypes="#//DTOLink">
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//DTO"
eOpposite="#//DTO/dtoSlaveLinks"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DTO" eSuperTypes="#//Target">
<eStructuralFeatures xsi:type="ecore:EReference" name="dtoSlaveLinks" upperBound="-1"
eType="#//DTOSlaveLink" eOpposite="#//DTOSlaveLink/owner"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="propertyLinks" lowerBound="1"
upperBound="-1" eType="#//PropertyLink" eOpposite="#//PropertyLink/owner"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dtoMasterLink" lowerBound="1"
eType="#//DTOMasterLink" eOpposite="#//DTOMasterLink/owner"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="DAO" eSuperTypes="#//Target">
<eStructuralFeatures xsi:type="ecore:EReference" name="daoLinks" upperBound="-1"
eType="#//DAOLink" eOpposite="#//DAOLink/owner"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Service" eSuperTypes="#//Target">
<eStructuralFeatures xsi:type="ecore:EReference" name="serviceLinks" upperBound="-1"
eType="#//ServiceLink" eOpposite="#//ServiceLink/owner"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Target" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="stereotypeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
derived="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
eType="#//PropertyProxy" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EntityProxy">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="stereotypeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="properties" lowerBound="1"
upperBound="-1" eType="#//PropertyProxy" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PropertyProxy">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="stereotypeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>

--------------040205020707060202060707--
Re: Link ending in a compartment [message #234242 is a reply to message #234235] Fri, 19 June 2009 11:40 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Esteban,

> end link to them. Now I would like to hide rectangle and layout my
> properties normally like uml2tools do with ClassFigure. I have set a
Try setting listLayout = true for corresponding compartment in .gmfgraph
model.

> Also where can I find semantic description of all GMF metamodels
> (gmfgraph, gmfmap, ...)? GMF Javadoc doesn't contains metamodels
> diagrams like in EMF Javadoc.
You can gather an information from GMF tutorials and wiki ( http://wiki.eclipse.org/GMF_Documentation#Tooling_Model_Hint s).

-----------------
Alex Shatalin
Re: Link ending in a compartment [message #234249 is a reply to message #234242] Fri, 19 June 2009 11:48 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Thanks Alex :)
Previous Topic:EditPart creation at compartement programmatially
Next Topic:Getting editpart in DiagramEditor file
Goto Forum:
  


Current Time: Thu Mar 28 22:27:28 GMT 2024

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

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

Back to the top