Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Adding attributes to a class via modeling workbench
Adding attributes to a class via modeling workbench [message #1850975] Wed, 23 March 2022 18:34 Go to next message
Atalay Özmen is currently offline Atalay ÖzmenFriend
Messages: 7
Registered: March 2022
Junior Member
Hello,

I have a class in my metamodel called entity and I don't want to give default attributes to this class, instead I want to let people who use this workbench add whatever attribute they want to their "entity" object. How can I make this happen? I couldn't find a element edition tool that lets modelers do this.

Thank you for your answers.
Re: Adding attributes to a class via modeling workbench [message #1850983 is a reply to message #1850975] Wed, 23 March 2022 22:00 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 566
Registered: May 2011
Senior Member
Hello,

If I understood corectly, in your metamodel, you just need a containment reference (0..*) on Entity typed Attribute. Attribute would be an EClass with a "name" string attribute and probably a type string attribute (and whatever else you would want to specify an Attribute). In your odesign, you can have a container mapping for the entity. Inside it, you add a node mapping for the Attribute. Then, in the tool section, you will just need a container creation tool for the Entity and a node creation tool for the Attribute elements.

Best regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Adding attributes to a class via modeling workbench [message #1851008 is a reply to message #1850983] Thu, 24 March 2022 13:05 Go to previous messageGo to next message
Atalay Özmen is currently offline Atalay ÖzmenFriend
Messages: 7
Registered: March 2022
Junior Member
Hello,

I was able to make a node creation tool for the EAttribute type, but when I try to select the EType of that node, I can only see the types that are defined in my metamodel.I attached an image that explains it.

However, I don't want to see only these types, I want to see all the types that ecore provides, such as String, Long, BigDecimal etc.

How can I make this happen too? Thanks for the answer.
Re: Adding attributes to a class via modeling workbench [message #1851090 is a reply to message #1851008] Sun, 27 March 2022 18:22 Go to previous message
Atalay Özmen is currently offline Atalay ÖzmenFriend
Messages: 7
Registered: March 2022
Junior Member
Can anyone help? I am still stuck with this problem.
Previous Topic:Feature not found exception when trying to create node
Next Topic:Edge creation maps multiple edges
Goto Forum:
  


Current Time: Thu Aug 18 12:06:21 GMT 2022

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

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

Back to the top