[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?

Waqas,

What you're looking to do sounds more like a generalization than a specialization or extension, i.e. you are trying to remove/relax a constraint rather than add/strengthen one. As such, it may be more appropriate to choose a different metaclass as the basis for your stereotype.

Unfortunately, there's no automated way to make the package merge implementation in UML2 adopt the altered semantics imposed by your stereotype. If you want to reuse the existing behavior, I'd suggest creating a specialization of the UMLUtil.PackageMerger utility class that overrides the necessary methods to achieve the behavior you are looking for (e.g. to inspect applied stereotypes and look for your special stereotype and related tag values) and use it instead of the default one to process your packages accordingly.

Kenn

Waqas wrote:
Hi,

I want to extend the UML's PackageMerge metaclass. The PackageMerge forces that the classes to be merged must have same name. I plan to relax this restriction and merge any two classes that perform similar responsibilities irrespective of the name of classes. Can someone guide me how to relax this check in UML. I have created a UML stereotype that extends the PackageMerge class but could not find a way to remove this 'same name' restriction.

A general guideline about extending UML relationships (to come up with new relationships) will also be helpful to me.

Thanks
Waqas