Page tree
Skip to end of metadata
Go to start of metadata

Table of Contents

General

LemonTree provides the possibility to filter and sort the Impacted Elements / Impacted Diagrams List and the Tree Browser. The diagrams in the Diagram Viewer are not filtered. The representation of the diagram is not changed by LemonTree, except for an overlay which highlights the kind of changes (added, modified, removed, etc.).
A filter expression can be built from logical expressions and can be saved for later use. A suggestion list provides keywords and predefined filters.

Basically, a filter is used to reduce the Impacted Elements / Impacted Diagrams List and the Tree Browser to a specfic set of elements or diagrams. Every element or diagram which matches a given filter expression is shown. If an element or diagram is not matched by the filter but is required for (hierarchical) visualization, the element or diagram is grayed out but visible.

In the filter text box the following keys can be used:

  • Arrow down, Arrow up to navigate in the dropdown list
  • Tab to select the highlighted element
  • Enter to apply the filter query

It is also possible to select the suggested keywords via click from the dropdown list.

Fallback search

If LemonTree is unable to parse the query, a fallback search is executed (on "Enter"). That means LemonTree searches the entered string in the elements properties (like Name, UmlType, ChangeType, ...).

Filter Keywords

The following keywords are used to build filter expressions:

KeywordDescriptionExampleResultRemarks
AuthorFilter by the Author of an elementAuthor: "Mr. LemonTree"Shows all elements where the author contains "Mr. LemonTree"

ChangeType

Filter by Change TypesChangeType: RemovedShows all removed elements
NameFilter by the name of an elementName: ConfigureShows all elements where the name contains "Configure"

Sort By

Sort elements by a specific property

ChangeType: Removed SORT BY UmlTypeShows all removed elements sorted by the UML Type

Stereotype

Filter by stereotypeStereotype: BlockShows all elements with the stereotype "Block"
UmlTypeFilter by UML TypeUmlType: ActivityShows all Activites
GUIDFilter by GUIDGuid: {FB95A4B4-66F5-4e21-B8E0-22ADEE0BB15F} Shows the element with the given GUIDNew in LemonTree 2.1.4
ChangeIn

Filter for modifications in specific properties and tagged values

ChangeIn: CodeShows elements where the property "Code" has been modifiedNew in LemonTree 2.1.4

Logical Operands, Sorted by Descending Precedence

NOTUsed for negating a logical expressionNOT ChangeType: RemovedShows all elements which were not removed
ANDUsed for combining two logical expressions where both have to be trueChangeType: Removed AND UmlType: ActivityShows all removed Activities
ORUsed for combining two logical expressions where only one of them has to be trueChangeType: New OR ChangeType: RemovedShows all elements which are either new or removed
IGNOREUsed to ignore certain changes while not hiding elements with such changes altogetherIGNORE ChangeIn: DefaultValueShows all elements which have changes in more than just the DefaultValue.
Also includes moved, removed and new elements.
New in LemonTree 3.1.4

Filtering specific diff version

For Change Types it is also possible to apply the filter to a specific version of the diff (A = left model, B = right model). To use this, simply add the letter of the version to the ChangeType.

For example:
ChangeType: RemovedA → This shows the elements which are removed in model A.

Predefined Filters

Some filters are predefined, which can be used as shortcuts. The following predefined filters are available:

Predefined FilterShortcut forExampleResult
#NewChangeType: New#NewShows all new elements
#ChildModifiedChangeType: ChildModified#ChildModifiedShows all elements where at least one child element has been modified (even if the element itself was not changed)
#ConflictedChangeType: Conflicted#Conflicted AND NOT UmlType: ClassShows all conflicted elements which are not a class

#Modified

ChangeType: Modified#Modified SORT BY NameShows all modified elements sorted by name
#MovedChangeType: Moved#Moved AND NOT Stereotype: "Block"Shows all elements which were moved and do not have the stereotype "Block"
#RemovedChangeType: Removed#Removed AND Author: "LieberLieber"Shows all removed elements which were created by the author "LieberLieber"
#Reviewed-NOT #ReviewedShows all elements which were not marked as reviewed
#UnmodifiedChangeType: Unmodified#UnmodifiedShows all elements with the ChangeType "Unmodified"

Filter Flags

Filter flags are used to apply additional settings for the filtering mechanism. They are marked with "$" and are also provided in the suggestion list. A flag can be added at the end of a filter expression and it can not be combined using logical operands.

Filter FlagDescriptionExampleResult
$HideGraphicalChanges

This flag hides changes that are only graphical.
A graphical change is a change where only the Diagram Representation of the element has changed, but not the element itself.

#Modified $HideGraphicalChangesShows all modified elements where only the element has been changed (and not its related Diagram Representation)
$OnlyMatchingChildElements

Per default, child elements which do not match a given filter expression are only grayed out.
To let them completely disappear this filter flag is required. 

#New and UmlType: Class $OnlyMatchingChildElementsShows all new classes and hides the elements which are not directly matched by the filter

Difference to Predefined Filters and Keywords

  • Filter flags cannot be combined using logical operands.
  • Filter flags always apply to the whole filter.
  • Filter flags have to be placed at the end.

Filtering of Diagram Representations

A filter expression is always applied to the Diagram Representation in combination with the element.
For example, the note element "double click to open diagram of the called activity" was not modified, but its Diagram Representation was.

Both the Element and its Diagram Representation are displayed if the filter matches either one of these.

Managing Filters

When clicking on the filter symbol  a dropdown is opened where you can save the current filter and select saved filters.

With thebutton you can save the current filter and define a name for it. The filter is then available in the Private Filters section.

To edit the name of a filter, click the  icon.
To delete a filter, click the icon.

Private and Public Filters

You can define, edit and delete private filters.

Public filters are defined in a CSV file which can be placed f.e. on a network share. The path to this shared filter definition is configured in the directory %AppData%\LieberLieber\LemonTree\Configuration.xml:

<?xml version="1.0" encoding="utf-8"?>
<UserConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi:"http://www.w3.org/2001/XMLSchema-instance">
  <PublicFiltersCsvFilePath>C:\Users\Username\Roaming\LieberLieber\LemonTree\Filters\PublicFiltersDemo.csv</PublicFiltersCsvFilePath>
</UserConfiguration>

LemonTree creates an example filter file called PublicFiltersDemo.csv in the directory %AppData%\LieberLieber\LemonTree\Filters\.

This demo file can be used as a template for creating a public filter definition.

Structure of the filter definition

"Impacted Elements" and "Impacted Diagrams" are the headers which then contain a number of filters that are available for the Impacted Elements or Impacted Diagrams list.

The name is displayed in the filter box, the query is placed in the textbox and executed when clicked on the filters name.

Impacted Elements

%Name%;%Query%
%Name%;%Query%

Impacted Diagrams

%Name%;%Query%
%Name%;%Query%

The example file is automatically created at startup if it does not exist.

LemonTree reads the public filter file on startup. Modifications to this file take effect only after restarting LemonTree.

How to use filters in LemonTree

In this basic example we want to find all elements containing "Display" in the name and sort it by name.

  1. We type "Na" - LemonTree suggests the keyword "Name:"


  2. The "Tab" key selects "Name: "
  3. When typing "Disp" LemonTree suggests elements that contain the string


  4. We can select a suggested element, but we want all elements which contain "Display" so we type "Display" and "Space". LemonTree suggests other keywords.


  5. We navigate via "Arrow down" to "SORT BY" and press "Tab" to select it. (Alternatively, you can also click the suggestion list entry)
  6. LemonTree suggests the possible keywords for sorting. We select "Name" via "Tab" and hit "Enter" or click the  button to execute the search.
  7. Result

Note: Also the grouping element "MainState" and "Signals" are shown (grayed out) because they have at least one child element with "Display" in its name.

Advanced Examples

Show all diagrams with elements that are directly changed (not only ChildModified)

  1. Before using a filter:


  2. The filter NOT #ChildModified is applied.

    The Activity "main" is no longer matched by the filter. Since its grouping element is matching the filter, it is still displayed but grayed out.

  3. The term "AND NOT #Unmodified" is added to exclude unmodified elements, in this case the diagram "Main" but also the Diagram Representation of the activity "main".

Final filter: NOT #ChildModified AND NOT #Unmodified

Hide elements which were already reviewed

  1. Before the filter:


  2. Enter the filter "NOT #Reviewed".

    The child element of the CallOperation "WriteLL" is grayed out, because it was already reviewed.

  3. If you want to reduce the list to elements which were not reviewed, the flag $OnlyMatchingChildElements can be added.

    The reviewed connector is now hidden.

Final filter: NOT #Reviewed $OnlyMatchingChildElements 

Hide elements where only the DiagramRepresentation was modified

  1. The filter #Modified is already set:


  2. However, there are elements which are only modified in their Diagram Representation.
    To hide them, add the flag $HideGraphicalChanges at the end of the filter expression.

    The elements with only graphical modifications are now hidden.

Final filter: #Modified $OnlyMatchingChildElements $HideGraphicalChanges 

Ignore certain changes

Sometimes you may want to ignore certain changes from elements, but not exclude these elements altogether. In this case, you can use the IGNORE operator.

  1. Let us assume that you want to ignore changes in Documentation but examine all other changes to elements. You filter by ChangeIn: Documentation and get these elements respectively their sub-elements:

    Worthy of note is the fact that SYSTICKS_PER_SECOND has changes in Documentation as well as DefaultValue.
  2. Applying the filter "NOT ChangeIn: Documentation" hides the property SYSTICKS_PER_SECOND even though it has changes in DefaultValue which you want to examine:


  3. To ignore all changes to Documentation, but still include elements if they have any other changes, you can use the IGNORE operator:

Final filter: IGNORE ChangeIn: Documentation

IGNORE lets you trim down your result set to focus on the changes you really want to see. To do this, combine IGNORE with arbitrary ChangeIn queries. If you have more than one term in IGNORE, make sure to encapsulate the query-to-be-ignored in parentheses, such as IGNORE (ChangeIn: Documentation OR ChangeIn: DefaultValue), as otherwise the query will be parsed as (IGNORE ChangeIn: Documentation) OR ChangeIn: DefaultValue

Advanced Combinations

When ignoring multiple property changes, be sure to use the correct operator to combine them:

  • Ignore changes in either Documentation, DefaultValue or both
    IGNORE (ChangeIn: Documentation OR ChangeIn: DefaultValue)
  • Ignore changes in Documentation and DefaultValue (i.e. only ignore the changes if both of the properties have changed)
    IGNORE (ChangeIn: Documentation AND ChangeIn: DefaultValue)
  • Ignore changes in Documentation or DefaultValue, but not if the element has changes in both
    IGNORE ((ChangeIn: Documentation OR ChangeIn: DefaultValue) AND NOT (ChangeIn: Documentation AND ChangeIn: DefaultValue))

The difference between AND and OR may not seem intutive at first because in english you would probably use AND when you want to ignore a set of changes, and never use OR when talking about ignoring things. However, this would reduce expressiveness of the filter and also introduce inconsistencies when re-using part of the query in a non-ignore context, so we think this compromise is worth it. Should you disagree with this, please contact support and we will find a solution!

Trimming the Result

If you are only interested in elements with changes in certain properties while at the same time ignoring other properties, but do not want new/removed/moved elements to be part of the result, you can exclude these like so:
NOT #NEW AND NOT #REMOVED AND NOT #MOVED AND IGNORE ChangeIn: Name

  • No labels