Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Association or property type in UML Profile?
Association or property type in UML Profile? [message #1834664] Sun, 15 November 2020 00:40 Go to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Hi guys,

I am creating a UML Profile. However I have a questions. In different forums I have read that usually associations are not specified in the UML Profile, but in the model. I have the following profile where I have defined a UML Profile and I have used composition. The XText grammar generated automatically is as follows:
WorldMap returns Corona::WorldMap:
	'WorldMap'
	'{'
		('base_Package' base_Package=[Package|EString])?
		'countrycorona' '{' countrycorona+=CountryCorona ( "," countrycorona+=CountryCorona)* '}' 
	'}';


index.php/fa/39309/0/

Another approach is to add a property to the stereotype WorldMap and add country corona as a property. The Xtext grammar generated automatically is as follows:
WorldMap returns Corona::WorldMap:
	'WorldMap'
	'{'
		('base_Package' base_Package=[Package|EString])?
		'country' country=[Corona::CountryCorona|EString]
	'}';


index.php/fa/39310/0/

I am more interested in the first approach, because in the second one, I should first create country corona before i can add them to the world map , while with the first one I can create them in place. Hope you understood what I mean.

Do you have any ideas about this? What would be the best solution?

Thank you!
Re: Association or property type in UML Profile? [message #1834671 is a reply to message #1834664] Sun, 15 November 2020 12:57 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

See https://www.eclipse.org/forums/index.php/m/1834670/#msg_1834670 on Xtext newsgroup.

Regards

Ed Willink
Previous Topic:Profile definition results in dangling references when using a model library
Next Topic:Difference between PrimitiveType and <EPackage,ModelLibrary > EDataType
Goto Forum:
  


Current Time: Thu Sep 19 19:29:22 GMT 2024

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

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

Back to the top