[Eugenia] Sub-labels into nodes and links [message #1738973] |
Tue, 26 July 2016 12:39 |
Alexandre Honorat Messages: 8 Registered: February 2016 |
Junior Member |
|
|
Hi,
I'd like to put some "sub-labels" in nodes and also in links. The online example of Eugenia does that with containment for referenced attributes, but what if the labels you want to show are simply plain attributes of the same node class ? Well, as it might be not very clear, here is an example of what I tried to write in the Emfatic source code:
@gmf.node(label="Name")
class Actor {
id attr String[1] Name;
@gmf.label(pattern="WCET: {0}")
attr int[1] WCET = 1;
}
@gmf.link(source="source", target="target", target.decoration="arrow", width="2")
class Channel {
id attr String[1] Name;
@gmf.label(text="<unset>", pattern="Prod: {0}")
attr String[1] ProdRate;
@gmf.label(text="<unset>", pattern="Cons: {0}")
attr String[1] ConsRate;
ref Actor[1] source;
ref Actor[1] target;
}
Not surprisingly it is not working for links (I guess a good solution would be to do the same thing as in this example). But for nodes, I don't understand why it's not working (actually, only the WCET value is printed below the "Name" label, not respecting the given pattern) . Is there a problem in my patterns ? Also is it possible to achieve all of that without doing an .eol file ?
Thanks,
Alex H.
[Updated on: Thu, 28 July 2016 09:26] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04688 seconds