The Filter Script

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.

Opening the Filter Script View

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.

open filters view

open filters view

Each line of the filter script is a separate statement. The railroad diagram illustrates the grammar of the filter script.

Examples

// 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

Stereotype

Some type filters have a stereotype. The stereotype which is displayed in a type's title bar is that of the matching type filter.

java element filters

Hiding lines

Three additional statements are permitted in the filter script:

hide inheritance lines
hide field lines
hide dependency lines

A note about how dependency lines work

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.

java element filters

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.

java element filters

Copyright © AgileJ Ltd. All rights reserved.

AgileJ StructureViews is a plugin for Eclipse which generates UML class diagrams reverse engineered from Java source code.

Learn More

Stay Up To Date


Get In Touch

AgileJ Ltd
Trident Court, 1 Oakcroft Road
Chessington, Surrey
KT9 1BD
United Kingdom
+44 20 8123 2318