[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: How to modify UML relationships?

Hi Waqas,

Some responses below ...

"Waqas " <waqaskamal@xxxxxxxxx> wrote in message 
news:6e8cd812373cffd81c335954946b865a$1@xxxxxxxxxxxxxxxxxx
> Hi Kenn,
>
> Few more questions:
>
> To generalize the merge relationship in UML, do i need to first extend the 
> merge relationship (using stereotypes) and then generalize that 
> stereotype?

If your goal is to modify or introduce behavior, you will not be able to 
accomplish this with the profile/stereotype concept.
IE, generalizing a stereotype will still not let you modify behavior in the 
extended meta class.

>
> Can i directly generalize the merge relationship in UML and make it part 
> of the UML meta-model (heavy-weight extension).

Yes - you could do that but that seems like overkill for this type of 
problem.

>
> My aim is to use the new merge relationship in different projects (just 
> like we can apply profile to any model).
>
> Your suggestion to specialize the UMLUtil.PackageMerger class and use it 
> to inspect the applied stereotypes seems to be a lengthy work to this 
> simple problem. Shall i define this specialization in the profile where i 
> have created new stereotype as extension to merge relationship?

I would agree with Kenn that simply specializing the package merger would be 
the simplest/best approach.
You could introduce a keyword or stereotype to indicate the new relationship 
and then have code to invoke the specialized package merger once you have 
identified the new relationship.
Ultimately though, I think you will need to modify the merger util as 
opposed to changing behavior from the core metaclass in UML.
>
> Thanks
> Waqas
>