Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[uml2-dev] UML2 profile: Redefine inherited operation

Hello,

I have problems redefining an inherited operation.

I'm working on an UML2 profile for my project in MDSD.

Stereotype MediaComponent is an abstract classifier. The subclass stereotype MediaContainer is associated via generalization. Both are extensions of (ecore) EClass. I redefine an operation addMedia(Media) in stereotype MediaContainer which is inherited from from stereotype MediaComponent by setting the property "Redefined Operation" to point to the general operation. Method name and parameters are set to the same values as in the general operation, only the included code shall be redefined in the generated code. When I try to define the profile I get to one error and one warning for each operation I try to redefine.

The error is:
Operation addMedia is a duplicate of inherited operation addMedia()

The warning is:
Operation addMedia sould be annotated as redefinition of operation addMedia()

When I remove the operation from the subclass everything works fine. When I remove the property "Redefined Operation" I only get the error concerning the duplicate operation.

I tried various ways to solve the problem but didn't find any solutions.

Any ideas?

Regards, Theresa


Back to the top