Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Using 2 labels on a node [GMF editor]
Using 2 labels on a node [GMF editor] [message #1747300] Fri, 11 November 2016 19:19 Go to next message
Gonçalo Miguéis is currently offline Gonçalo MiguéisFriend
Messages: 1
Registered: November 2016
Junior Member
Hello there.

i'm trying to find a way to have two labels on a node in a GMF editor.
I'm allready showing a label from the emf file that represents the name. I want this to be locked (with the type of the node) and have another one to represent a id (or another name) that its changeable. The second one i don't have any ideia how to create it.
I found a link that was helpfull (http://www.eclipse.org/epsilon/doc/articles/eugenia-polishing/) but i wasn't still able to create it correctly. I allready have a eol file that changes some names from the editor and the folder aswell, i reckon this might be the file in which i should be able to do it but i just can't understand how :c
Re: Using 2 labels on a node [GMF editor] [message #1747428 is a reply to message #1747300] Mon, 14 November 2016 15:40 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1589
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Adding a new label above the generated one using a polishing transformation should do the trick. Minimal example follows:

@namespace(uri="people", prefix="people")
package people;


@gmf.diagram
class World {
	val Person[*] people;
}

@gmf.node(label="name")
class Person {
	attr String name;
}


var label : new GmfGraph!Label;
label.text = "Person";
GmfGraph!RoundedRectangle.all.
	selectOne(r|r.name="PersonFigure").
		children.add(0, label);


Cheers,
Dimitris
Previous Topic:Visualize the generated model as UML diagram no as ecore
Next Topic:Provide getter for thrown object in EolUserException
Goto Forum:
  


Current Time: Mon Sep 24 23:06:15 GMT 2018

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

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

Back to the top