Home > Diagrams > Class Diagram

Property Concept

The property concept has been improved inside EclipseUML 2008.

The logic is that if you select Show Association Member then accessors created by the association will be displayed. 
If you unselect both Show Association member and Show Accessors, then the Property Concept will be activated by hiding all accessors.

Property concept is now composed by two options:

  1. Show Hide Association member
  2. Show Hide Accessors

1. Show Hide Association Members

When working with a class diagram, it is possible to activate or not the Property concept related to association members.
This two Classes having an 0..1 to 0...1 association between them.
You can notice that Property and Operation which are related to an association have a small arrow under the Attribute or method icon.



If you want to hide this association Property and accessors, then click on the Class Diagram Background > Preferences



Unselect Show association members field and click on the Ok button



The association members has been immediately hidden.
Note that you can hide either Attributes or Methods independently.


 
2. Show Hide Accessors

It is important in Java to generate accessors for every attribute, but it not really important to display this accessors information in a UML Class Diagram.
You can hide accessors by using the Show Hide accessors option in the Class Diagram contextual menu.

For example if you add a New > Attribute on Class 1




The following wizard will appear and allow to create or not accessors for this Attribute.



If we select to generate accessors, then the java code is clean but this information is also in the Class Diagram.



In order to avoid adding none necessary information in your class diagram and hide attribute accessors then click on the Class Diagram background and unselect Show Accessors option.



Here is your class after selecting this option