Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] Redefinition of setVisibility() function in ClassifierImpl or PackageImpl ?


It used to be (up to UML 2.4.1) that PackageableElement refined the 'visibility' attribute such that it was required (i.e., it had a lower bound of 1). So, while the attribute was optional (and unsettable) for named elements, it wasn't for packageable elements.

However, this has changed as of UML 2.5; the attribute is no longer required for packageable elements and instead there is a constraint to assert that a visibility is specified when a packageable element is owned by a namespace.

It appears that the implementation wasn't updated to account for this change. If you open a bug, I'll see to it that it gets updated (to make the redefinition unsettable as well).



On Fri, Dec 5, 2014 at 9:47 AM, Calin Glitia <calin.glitia@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello everybody,

I am working on the integration of emf compare with uml2 and I have encountered some problems during the undo of the unset of the visibility attribute for some UML elements. It works for a UML Port but not for a Class or a Package. 

The problem comes from the re-implementation of the setVisibility function in ClassifierImpl and PackageImpl as the re-implementations are missing two line codes that set the visibility eset flag:
boolean oldVisibilityESet = (eFlags & VISIBILITY_ESETFLAG) != 0;

Can somebody tell me why the setVisibility function from NamedElementImpl needs to be overwritten and why the two line codes are missing. 

Thank you, 
R&D Engineer
Esterel Technologies - A wholly-owned subsidiary of ANSYS, Inc.
Twins 1, 679 Av Julien Lefebvre
06270 Villeneuve Loubet

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_______________________________________________ mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top