Filtering allows you to discriminate between Java types and members so as to control how particular types and members are displayed. Filters are activated on a class diagram by calling them in the filter script. Each class diagram has its own filter script. Note that if the class diagram file is not editable or your license is not valid then the filter script will also not be editable.
With a class diagram open the filter script can be opened from the toolbar or by right clicking on empty space on the class diagram and selecting Open Filter Script.
Each line of the filter script is a separate statement. The railroad diagram illustrates the grammar of the filter script.
// highlight deprecation
show deprecated fields in red
show deprecated methods in red
show deprecated types in pink
// standard colors
show bytecode types in gray
show all interfaces in blue
show abstract classes in pink
show concrete classes in green
// highlight spring
show spring types in purple
show spring methods in larger red
show spring fields in larger red
show all types in gray
Some type filters have a stereotype. The stereotype which is displayed in a type's title bar is that of the matching type filter.
Three additional statements are permitted in the filter script:
hide inheritance lines
hide field lines
hide dependency lines
Where class A is a subclass of class B, then class A depends on class B. Likewise if class C has a field of type D, then class C depends upon class D. However, rather than clutter the diagram with dependency lines from A to B and C to D, these dependency lines are omitted as the dependency is already evident from the presence of the inheritance line and the field line.
However, if you hide inheritance lines, then the inheritance line from A to B will be replaced with a dependency line. And likewise, if you hide field lines, then the field line from C to D will be replaced with a dependency line.
Copyright © AgileJ Ltd. All rights reserved.