| 
| sticking a text to a connection [message #145662] | Tue, 07 August 2007 11:04  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: orlando.opencanarias.com 
 Hello all,
 
 I'm not able to came across a way to stick a text
 label to a connection. I just want to label every
 occurrence of the same connection type with the
 same piece of text.
 
 I've tried to do this by modifying the .gmfgraph to
 have the Figure representing the connection
 containing both the Polyline and the Label:
 
 -> Figure Descriptor MyAssociacion
 -> Polyline Connection MyAssociation
 -> Label MyAssociationLaben
 * text = <<MyAssociation>>
 
 I made no changes on neither .gmftool or .gmfgraph.
 When I execute the editor the piece of text
 "<<MyAssociation>>" appears on the canvas, but always
 on the top-left hand side of it, too far away from
 the connection; moreover, it isn't possible to move
 it around.
 
 
 I've also been playing with the element Design Label
 Mapping as a child of the Link Mapping within the
 ..gmfmap, mapping it to the Label MyAssociation, but
 the generated editor doesn't seem to change in any
 way.
 
 
 I'd be very grateful if someone could give me some hints
 on how to go on...
 
 Cheers!
 
 Orlando.
 |  |  |  | 
|  | 
|  | 
| 
| Re: sticking a text to a connection [message #147264 is a reply to message #145745] | Tue, 21 August 2007 08:28  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: orlando.opencanarias.com 
 Hello,
 
 Thank you for your reply. I'm afraid It doesn't seem to
 work by including a DesignLabelMapping, a LabelMapping nor
 a FeatureLabelMapping in the .gmfmap model. The generation
 of .gmfgen model doesn't show any error; however, the resulting
 editor doesn't show any label attached to the connection but
 located at the top-left corner of the canvas.
 
 I've even tried to stick a label (showing a metafeature) to a
 connection (for example, the association's name, similar to the
 taipan example) using the GMF wizards, but didn't work anyway.
 I generated .gmfgraph, .gmftool and .gmfmap. given a very simple
 ecore metamodel. After including some missing features in .gmfmap
 and generating .gmfgen the resulting editor seemed to show the
 same malfunctioning.
 
 The main difference between my generated .gmfgen model and
 the one from taipan is that the former have InnerClassViewmap
 elements where the latter shows FigureViewmap ones. By the
 way, I tried to modify my generated .gmfgen model by hand to
 make it similar to the one from taipan but didn't work
 anyway; after solving some dependencies errors I managed to
 compile the editor's code, but when executed it dind't
 show the label anyway.
 
 And now I wonder whether the automatic generation of .gmfgen
 models is working fine, and whether it is able to create a
 suitable .gmfgen for the GMF generator. Perhaps the feature
 I'm talking about (sticking a label to a connection) might
 have not been included yet in either the .gmfgen generator or
 the GMF editors generator. Has someone been able to do what
 I'm trying to do without manipulating by hand either .gmfgen
 nor the editor code itself?
 
 
 Cheers!
 
 Orlando
 
 
 
 On Wed, 08 Aug 2007 09:35:56 +0000, Alex Shatalin wrote:
 
 > Hello Orlando Avila-Garcia,
 >
 > I suggest you to try "Design Label Mapping" or even "Label Mapping" for it.
 >
 > -----------------
 > Alex Shatalin
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04108 seconds