Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Node Label Pattern Configuration
Node Label Pattern Configuration [message #1058499] Tue, 14 May 2013 11:15 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member
Hi all,

@gmf.node(label="name,", figure="rectangle", label.icon="false", label.pattern="{0} : {1}", label.edit.pattern="{0}")
class ViewField extends ContentUnit {
  attr String[1] name;
  ref Field[1] field;

abstract class Field extends ContentUnit {
  attr String[1] name;

i need to set ViewField label name on diagram = + but when i try above code its not work so how can i done this anyone can help me ?

Re: Node Label Pattern Configuration [message #1058641 is a reply to message #1058499] Tue, 14 May 2013 15:19 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 475
Registered: January 2010
Senior Member
Hi serhat,

I'm afraid using something like '' is not supported by Eugenia at the moment. Eugenia maps 'label="a,b"' to GMF feature label mappings, and these are restricted to the attributes of the EClass itself. We'd need to implement a different kind of mapping, and I'm not 100% sure GMF will allow for it in its models or if it will need custom code.

Incidentally, you might want to use label.view.pattern and label.edit.pattern instead of label.pattern and label.edit.patttern. label.pattern is both for editing and viewing, and I'm not sure if label.edit.pattern might conflict with it.

Update: I've looked a bit into this and you may need to use a GMF Expression Label Mapping. Eugenia does not support them, and I'm not sure if we should: according to the official documentation, users need to customize the generated code anyway to have changes in the label update the model. Here is some documentation I have found regarding these mappings:

A polishing transformation and a bit of custom code in the generated label class should do the job, I think.

Best regards,

[Updated on: Tue, 14 May 2013 15:33]

Report message to a moderator

Previous Topic:Question about adjusting links
Next Topic:EuGENia Annotations
Goto Forum:

Current Time: Sun Jun 24 17:15:04 GMT 2018

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

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

Back to the top