Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Multiple Inheritance
Re: Multiple Inheritance [message #1148805] Mon, 21 October 2013 19:08 Go to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Mahin,

As Ed already indicated, this is a UML question and should be asked on
the UML2 newsgroup (which I copy on this reply).

See some replies in-line, below.

HTH,

Christian


On 2013-10-21 16:37:40 +0000, Mahin Abbasipour said:

> Hi,
>
> thank you very much for your reply.
>
> class DataRate is inheriting at the same time from classes Performance
> and NonfunctionalRequirement which are the extension of metaclass Class
> (base_Class: Class). UR is the name of defined UML profile. As far as I
> know, multiple inheritance is supported in UML2.

Stereotypes support multiple inheritance as any Class does, yes.


> Diagnosis of UR
> Processed inheritance of feature 'base_Class : Class' by class
> 'DataRate -> Performance, NonFunctionalRequirement' as a duplicate of
> feature 'base_Class : Class'.

This is quite expected. You have two stereotypes Performance and
NonfunctionalRequirement that both extend the Class metaclass, so of
course they both define a property named "base_Class". Now you have a
new stereotype DataRate that specializes both of these.

So, it inherits two distinct "base_Class" attributes. Which should be
used to actually apply this stereotype to a class? It is impossible
for the UML2 API to know. And the Ecore representation of the DataRate
stereotype isn't any happier.

However, I think the default behaviour of the UML-to-Ecore
transformation when you define your profile is to simply discard
duplicate attributes like this to resolve the conflict. The tool
notifies you when this happens, but I think the profile should actually
work. Does it not? Or are you just worried about this warning message?


>
> Thanks,
> Mahin
Re: Multiple Inheritance [message #1148990 is a reply to message #1148805] Mon, 21 October 2013 21:53 Go to previous messageGo to next message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Hi,

When I try to apply the defined profile which I got the message, It is not among the list of the loaded profiles, Although I loaded it before.

Thanks a lot,

Mahin
Re: Multiple Inheritance [message #1149989 is a reply to message #1148990] Tue, 22 October 2013 12:59 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Mahin,

I have attached a working example of what I understand to be your use case.

The StereoMI profile defines a steretype named 'AuxUtil' that
specializes Auxiliary and Utility from UML's StandardL2 profile. (it
appears that in your case, you are specializing stereotypes from MARTE)

Defining the profile yields this warning:

Processed inheritance of feature 'base_Class : Class - L2' by class
'AuxUtil -> Auxiliary, Utility' as a duplicate of feature 'base_Class :
Class - L2'.

which indicates that UML resolved the conflicting multiple feature inheritance.

I then loaded this profile into the editor of a test model, applied it,
and applied the AuxUtil stereotype successfully to a class.

So, assuming that this doesn't work for you, can you tell us what is
different in your scenario?

HTH,

Christian





On 2013-10-21 21:53:16 +0000, Mahin Abbasipour said:


> Hi,
>
> When I try to apply the defined profile which I got the message, It is
> not among the list of the loaded profiles, Although I loaded it before.
>
> Thanks a lot,
>
> Mahin
Re: Multiple Inheritance [message #1150057 is a reply to message #1149989] Tue, 22 October 2013 13:58 Go to previous message
Mahin Abbasipour is currently offline Mahin AbbasipourFriend
Messages: 24
Registered: June 2013
Junior Member
Thank you very much. you are right. It works. the problem was somewhere else.
Previous Topic:Sequence diagram: two messages with executed at the same time
Next Topic:Applying stereotype to property as association end throws IllegalArgumentException
Goto Forum:
  


Current Time: Thu Apr 25 14:26:38 GMT 2024

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

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

Back to the top