Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] using properties of embedded classes in labels?
[Eugenia] using properties of embedded classes in labels? [message #1400884] Mon, 14 July 2014 21:30 Go to next message
Scott Finnie is currently offline Scott FinnieFriend
Messages: 94
Registered: October 2011
Member
Hi

I have a simplified UML class diagram editor working with Eugenia. The `Association` class currently looks like this:

@gmf.link(label = "name", source = "classA", target="classB")
class Association extends NamedModelElement {
	ref  FClass classA;
	attr String phraseA;
	attr String multiplicityA;
	ref  FClass classB;
	attr String phraseB;	
	attr String multiplicityB;
}


which works, but the repeating elements are inelegant. I'd rather do something like this:

@gmf.link(label = "name", source = "roleA.participant", target="roleB.participant")
class Association extends NamedModelElement {
	val  RelRole roleA;
	val  RelRole roleB;
}

class RelRole {
	ref  FClass participant;
	attr String relPhrase;
	attr String multiplicity;
}


However that results in an error at build time. Is there a way to achieve this? Apologies if it's documented somewhere, didn't show up in googling.

Thanks.


Re: [Eugenia] using properties of embedded classes in labels? [message #1400906 is a reply to message #1400884] Mon, 14 July 2014 22:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Scott,

Referencing properties of nested classes is not supported in Eugenia. I can't really think of a good workaround for this I'm afraid...

Cheers,
Dimitris
Re: [Eugenia] using properties of embedded classes in labels? [message #1400935 is a reply to message #1400906] Mon, 14 July 2014 23:26 Go to previous message
Scott Finnie is currently offline Scott FinnieFriend
Messages: 94
Registered: October 2011
Member
Dimitris Kolovos wrote on Mon, 14 July 2014 23:15
Hi Scott,

Referencing properties of nested classes is not supported in Eugenia. I can't really think of a good workaround for this I'm afraid...



OK no worries, thanks for the quick reply Dimitris. It works as-is so I'll just stick with that.

rgds,
Scott.
Previous Topic:[EOL] Regex matches in select
Next Topic:[EVL] cyclic connection
Goto Forum:
  


Current Time: Fri Apr 26 21:57:38 GMT 2024

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

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

Back to the top