REFERENCE:
The "Expression" field is the essence of a mechanism for filtering out elements in the diagrams. It contains an expression written using the queries syntax described below.
This is how it works: before Together displays an element, it first checks if some "Show ..." options are turned off. If the user has unchecked some options, Together then:
a) applies the "Expression" query of each unchecked option
to the element.
b) if the returned value for at least one expression is "true", then an element will not be shown. Otherwise, it will be visible.
Don't let this description confuse you. In practical terms: if you do not wish to show certain elements in the diagram, create an expression that will return "true" for the kind of element you want to hide. The effect is that if you uncheck that option, your expression will filter out all unwanted elements.
Normally, you shouldn't need to modify or create a new expression because Together ships with a set of predefined filters sufficient for most cases. Nevertheless, if you wish to adapt Together to your special needs, here is an explanation of the expression syntax used in the "Expression" field.

The "Expression" field must contain a Boolean query. A query is a command recognizable by Together which can be run immediately and can perform some action(s). A query can also return some result-- strings, objects, or a Boolean value for example.
Several Boolean queries can be grouped into one Boolean expression to
formulate a nontrivial condition, using these logical operators: !,
&&, || (they behave just like corresponding Java/C++
logical operators), and parentheses. For example:
((query1) || (query2)) && (!query3)
Possible Boolean queries are:
isDiagram() - checks if an element is RwiDiagram.
isLink() - checks if an element is RwiLink.
isMember() - checks if an element is RwiMember.
isNode() - checks if an element is RwiNode.
isPackage() - checks if an element is RwiPackage.
hasProperty(propertyName) - checks if
an element has the specified RwiProperty.
The propertyName is a quoted string containing a name of
a property. For example:
hasProperty("$interface")hasProperty("$public")
hasPropertyValue(propertyName, propertyValue) - checks
if an element has the given value of the specified property.
The propertyName is a quoted string containing a name of
a property.
The propertyValue is a quoted string containing a value
of a property. For example:
hasPropertyValue("$shapeType", "Class" )hasPropertyValue("$shapeType", "AssociationLink" )hasPropertyValue("$shapeType", "Attribute" )
The names and values of some properties are defined in the RWI API
(for example, in the RwiProperty and RwiShapeType
interfaces), so it is expected that you are familiar with RWI (if you
are not, see the API documentation in the \doc directory under your
installation). The description of properties and different RwiElements
can also be found in the RWI API documentation.
Here is how to create your own filter. Suppose, you want to be able to omit those protected classes in the diagrams which are read-only or implement any interface: In the "User defined" Show option, open an "Expression" field and enter this value:
((hasPropertyValue("$shapeType", "Class") && (!hasProperty("$interface"))) && hasProperty("$protected")) && (hasProperty("$readOnly") || hasProperty("$implements"))