tags:

views:

20

answers:

3

UML2 is a plugin of eclipse, it's here http://www.eclipse.org/modeling/mdt/?project=uml2

Now, I want to hide the getters and setters, but I don't know how to get it.

Any suggestions?

A: 

At the UML metamodel level, there is no "getter" or setter".

So even if you somehow reverse-engineered your Java Code and end up with an UML representation, each getXXX() and setXXX() represent legitimate services that the GUI (like the MDT-UML2Tools) won't hide.

alt text

VonC
A: 

The show hide compartment was an RSA feature available in RSA 6 and later releases which has been also implemented by Omondo with EclipseUML 2008. I don't think free tools have such advanced features. alt text

Does your UML plugin have this feature? I don't think so. The "Operation Compartment" option hides all methods.
Keating Wang
But I only want to hide the getters and setters.
Keating Wang
A: 

This getters and setters should not be displayed in the diagram, I agree it has no modeling value. Hidding all methods with the show hide compartment is not also an acceptable solution. Just unselect show association member for methods or even attributes in the class diagram preferences contextual menu. I tried it this morning and it works well :-)

See picture below : alt text