Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore - inherited derived attributes
Ecore - inherited derived attributes [message #1838761] Thu, 04 March 2021 16:47 Go to next message
Francesco Bedini is currently offline Francesco BediniFriend
Messages: 32
Registered: March 2018
Member
I am trying to create a metamodel for logical expressions:
index.php/fa/40080/0/
Is there a way to define those inherited "output" derived attributes?
Should they rather be operations?
  • Attachment: Derived.png
    (Size: 51.17KB, Downloaded 210 times)
Re: Ecore - inherited derived attributes [message #1838768 is a reply to message #1838761] Thu, 04 March 2021 18:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In UML, yes. Only Operations are polymorphic.

In Ecore, probably. If you're lucky you can exploit the Java implementation as getOutput() to achieve polymorphism, but IIRC you need to do a bit of manual fixing up.

Much easier to use operations.

Regards

Ed Willink
Re: Ecore - inherited derived attributes [message #1838790 is a reply to message #1838768] Fri, 05 March 2021 06:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Certainly in the Java implementation classes you can override the methods, and in the Ecore model you can define an operation that has the same signature as the generated getter for the feature to "override" it.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Ecore + XMI
Next Topic:[CDO] RootResourceID is null error - Workaround
Goto Forum:
  


Current Time: Tue Apr 16 05:10:39 GMT 2024

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

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

Back to the top