Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Automated treatment when creating model
Automated treatment when creating model [message #1760599] Fri, 28 April 2017 18:33 Go to next message
Guillaume Dupont is currently offline Guillaume DupontFriend
Messages: 21
Registered: April 2017
Junior Member
Hi,

Let's say I have a profile like that:
index.php/fa/29182/0/

Here the "content" relation really looks like a package/class containment relation; is there a way I can map it?
That is: when I am creating a model from this meta-model, if I put a "Table" (ie: a class) in a "Database" (ie: a package), which will correctly instantiate UML attributes (that is Packaged Elements and so on) is it possible to say to Papyrus to instantiate my "base" and "tables" attributes as well?
Re: Automated treatment when creating model [message #1760705 is a reply to message #1760599] Tue, 02 May 2017 09:11 Go to previous messageGo to next message
Florian Noyrit is currently offline Florian NoyritFriend
Messages: 16
Registered: February 2016
Location: Grenoble, France
Junior Member
Hi,

Yes, you can do that using the ElementTypeConfiguration framework.
You'll find the documentation of this framework in the Eclipse's Help Contents (Papyrus Guide/Toolsmith Guide/elementTypeConfigurations Framework).
You would basically add some advices to set this stereotype values on the creation, container change, ....

Best regards.
Re: Automated treatment when creating model [message #1760849 is a reply to message #1760705] Wed, 03 May 2017 15:21 Go to previous messageGo to next message
Guillaume Dupont is currently offline Guillaume DupontFriend
Messages: 21
Registered: April 2017
Junior Member
Hi,

Thank you for your answer; I dove into the documentation and it seems that something is doable.

However, I have trouble figuring things out; can I define a behavior in the .elementtypesconfiguration Do I have to do it in some classes?
Besides, I cannot find an explicit method for using this framework, would you have some guidelines by any chance?

Actually the best thing to do would be to give us a proper example.
Starting from my initial profile, say I want to automatically set the "base" attribute of a table and the "tables" attribute of a base whenever I create a Table (a class) in a Base (a package), how would I do that ?

Thanks again for your help,

Guillaume.
Re: Automated treatment when creating model [message #1761013 is a reply to message #1760849] Fri, 05 May 2017 09:45 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

Benoit has been so kind to publish an example (at least for the Neon release). See

https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/tree/examples/library?h=streams/2.0-maintenance

https://github.com/bmaggi/library-training
Re: Automated treatment when creating model [message #1761170 is a reply to message #1761013] Mon, 08 May 2017 14:16 Go to previous message
Guillaume Dupont is currently offline Guillaume DupontFriend
Messages: 21
Registered: April 2017
Junior Member
Hi,

After a moment of figuring-things-out I finally obtained something!

This project was of a great help.

Thank you very much!
Previous Topic:Model Execution trace = sequence diagram?
Next Topic:This diagram is contained in an unresolved resource
Goto Forum:
  


Current Time: Tue Apr 23 06:40:58 GMT 2024

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

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

Back to the top