Can I hide the getter and setter methods in the UML2's view?
UML2 is a plugin of eclipse, it's here http://www.eclipse.org/modeling/mdt/?project=uml2
Now, I want to hide the gette开发者_Python百科rs and setters, but I don't know how to get it.
Any suggestions?
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.
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.
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 :-)
精彩评论