Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile? [message #586696] Thu, 08 February 2007 22:54
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Hi,

I got a use case where I need to replace the built in
NamedElement::isDistinguishableFrom query with another customized query
that also considers the NamedElement::type in the comparison.

Is this possible to do with current UML2 implementation using a new
profile where I define a new overriden/redefined operation
isDistinguishableFrom() for a stereotype <<MyClass>> ?


----------------------------
NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace): Boolean;
isDistinguishable =
if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
then
ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
else true
---------------


thanks
/anders
Previous Topic:[Announce] MDT UML2 2.0.3 M200702081049 is available
Next Topic:Using UML2 GenModel with a simple eCore model to handle 'subsets'
Goto Forum:
  


Current Time: Thu Apr 25 07:54:19 GMT 2024

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

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

Back to the top