To edit complex and nested filters you could use the filter editor dialog. It provides syntax highlighting, content assistance and a formatter for nested filters.
Syntax coloring helps you to distinguish the different elements of an LDAP filter. The following colors and fonts are used:
Element | Color |
---|---|
opening and closing parenthesis | black and bold |
filter operator (& | !) | green and bold |
attribute | violett |
filter type | red and bold |
assertion value | blue |
The filter editor provides the following helpful features when editing an LDAP filter:
Automatically adds and removes opening and closing parenthesis: just start typing the attribute or filter operator.
Hit Strg-Space to open a list of available code completions, press Esc to close the list.
Attribute completion: when typing an attribute, e.g. "tel" a list with attributes that start with the "tel" is opened.
Object class completion: if the attribute is objectClass a list with available object classes is opened.
Matching rule completion: for filters with extensible matching a list with available matching rules is provided.
In the filter editor it is possible to format complex and nested filters. The formatter is invoked by pressing the Format button and formats the filter the following way:
Each filter item gets its own line.
Each level of a nested filter is intended according to the level.