Skip to main content

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

Theresa,

Please use the newsgroup (eclipse.modeling.mdt.uml2) for questions like this in the future.

The only way to support redefinition (and other UML-specific constructs like subsetting and unions) in a profile is to define the profile statically. Dynamic profile definitions make use of the default Ecore mapping, and Ecore does not support redefinition. With static definitions, you generate code for the profile just as with any other metamodel, and have complete control over the generator settings and implementation.

Cheers,

Kenn Hussey
Program Manager, Modeling and Design Solutions

Embarcadero Technologies, Inc. | www.embarcadero.com 
82 Peter Street, Second Floor | Toronto, ON  M5V 2G5
Kenn.Hussey@xxxxxxxxxxxxxxx
Office: 416-593-1585 x9296 Mobile: 613-301-9105


-----Original Message-----
From: uml2-dev-bounces@xxxxxxxxxxx [mailto:uml2-dev-bounces@xxxxxxxxxxx] On Behalf Of Theresa Linke
Sent: Sunday, March 08, 2009 11:39 AM
To: uml2-dev@xxxxxxxxxxx
Subject: [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
_______________________________________________
uml2-dev mailing list
uml2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/uml2-dev


Back to the top