Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Link label from attribute of contained class
[Eugenia] Link label from attribute of contained class [message #1429654] Tue, 23 September 2014 14:36 Go to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hello, I am trying to set a link's label value to be auto assigned based on an attribute of a contained class (after following this example right here).

My emfatic code :
@gmf.link(source="from", target="to", style="solid", target.decoration="closedarrow", width="1", label="transitionName")
class Transition {
  ref Function function;
  ref State#outgoingTransitions from;
  ref State#incomingTransitions to;
  derived transient volatile attr String transitionName;
}

@gmf.node(label="name", size="190,20",margin="3")
class Function {
  id attr String name;
  ....
  ....
  ....
}


After generating the editor I edited the TransitionImp as follows
/*
* generated NOT
*/
public String getTransitionName() {
		return function.getName();
}


My problem is that in the editor the transitionName is set as it should in the properties view (it is always the same as the function's name), however no label is shown in the canvas for the transition(at all).

Apart from that, in the gmfgraph it seems like the Label TransitionLabelLabel is not under the TransitionFigure --> Polyline Connection but it is under another figure called TransitionLabelFigure.
index.php/fa/19233/0/

Could somebody give me a clue on how to fix this?
  • Attachment: figure.png
    (Size: 17.12KB, Downloaded 581 times)

[Updated on: Tue, 23 September 2014 15:21]

Report message to a moderator

Re: [Eugenia] Link label from attribute of contained class [message #1430753 is a reply to message #1429654] Wed, 24 September 2014 19:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

Could you please put together a minimal example [1] I can use to reproduce this?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: [Eugenia] Link label from attribute of contained class [message #1430809 is a reply to message #1430753] Wed, 24 September 2014 21:23 Go to previous messageGo to next message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Dear Dimitris,

I am attaching you a minimal example and the instructions file.
(I included a small plot for the expected - actual behaviour as well)

Thank you for the support.



Kind Regards, Nikos
Re: [Eugenia] Link label from attribute of contained class [message #1431016 is a reply to message #1430809] Thu, 25 September 2014 05:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Niko,

This is a refresh problem; if you close and open your editor again, Transition labels appear as expected. [1] should be a good starting point for further investigation.

Cheers,
Dimitris

[1] https://wiki.eclipse.org/GMF_Newsgroup_Q_and_A#How_can_I_synchronize_my_custom_figures_with_the_model.3F
Re: [Eugenia] Link label from attribute of contained class [message #1431433 is a reply to message #1431016] Thu, 25 September 2014 17:36 Go to previous message
Nikos Margaritis is currently offline Nikos MargaritisFriend
Messages: 65
Registered: September 2014
Member

Hi Dimitri,

Thanks for replying.

I tried a few things without any success, I have currently created a thread under GMF's forum about this issue here

Kind Regards, Nikos
Previous Topic:[Eugenia] Multiline property of a node's attribute
Next Topic:Identify unset/undefined attributes in Entities
Goto Forum:
  


Current Time: Tue Apr 23 12:13:31 GMT 2024

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

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

Back to the top