Skip to main content



      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 14:34 Go to next message
Eclipse UserFriend
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 18:00 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Adding attributes to a class via modeling workbench [message #1851008 is a reply to message #1850983] Thu, 24 March 2022 09:05 Go to previous messageGo to next message
Eclipse UserFriend
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 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Can anyone help? I am still stuck with this problem.
Re: Adding attributes to a class via modeling workbench [message #1858010 is a reply to message #1851090] Fri, 10 March 2023 16:17 Go to previous message
Eclipse UserFriend
Hello. Any solution on the above thread?
Previous Topic:Not showing references for Ecore diagrams
Next Topic:Eclipse Sirius - Overriding/Customisation of Native Features
Goto Forum:
  


Current Time: Wed Jul 02 18:12:15 EDT 2025

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

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

Back to the top