Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » 2 Label for node on Diagram
2 Label for node on Diagram [message #1062165] Thu, 06 June 2013 10:46 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
Hi,

i need 2 label insteadof 1 for node on diagram.

So i try create ExpressionLabelMapping on GmfMap model when i create 2

ExpressionLabelMapping always second one displaying.

So How can i create 2 label for one Node on Diagram ?

(Not : problem description added as a picture)

Regards

  • Attachment: labels.png
    (Size: 172.88KB, Downloaded 35 times)
Re: 2 Label for node on Diagram [message #1062634 is a reply to message #1062165] Mon, 10 June 2013 08:21 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

in your gmfgraph model you can define labels to which you can map your expression labels. Do you run into this (https://bugs.eclipse.org/bugs/show_bug.cgi?id=331875)?

Ralph
Re: 2 Label for node on Diagram [message #1062806 is a reply to message #1062634] Mon, 10 June 2013 19:39 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
Hi,

I have never seen it before. Now i understand problem.

But I do not understand what i must change in code.

I rename Parser and regenerate Diagram But this time again first expressionLabel cant seen on diagram.(But second one is seen Smile)

Can u explain more to me?

Regards

[Updated on: Mon, 10 June 2013 19:50]

Report message to a moderator

Re: 2 Label for node on Diagram [message #1062940 is a reply to message #1062806] Tue, 11 June 2013 13:40 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

I solve this problem by fixing the generated genmodel with a qvto transformation that is executed each time the genmodel is produced. Do the following:

1) create a folder called transformation
2) create a file called postRec.qvto in this folder
3) place the following code in it


modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel');
	
transformation postRec(inout gmfgenModel : GMFGEN);
	
 
main() {
--fix BUG 331875
	gmfgenModel.objectsOfType(ExpressionLabelParser)->forEach(parser)
	{
		parser.className := parser.className.concat(parser._uses->first().container().oclAsType(GenCommonBase).visualID.toString());
	};
}


4) On the last page of the genmodel generation wizard select "Extra in-place gmfgen transformation after a reconcile step"
5) Fill into the text box platform:/resource/pluginname/transformation/filename.qvto
6) Press finish

This should solve the problem if you run into this bug.

Ralph
Previous Topic:Need help to remove Undo/Redo actions from popup menu
Next Topic:technical probleme
Goto Forum:
  


Current Time: Sun Nov 23 16:30:32 GMT 2014

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

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