That is yet another syntax for filtering stuff. You should preferably use the FilterEdit components which are used around the IDE.
However this window uses a TCustomControl descendant for the messages. Maybe we should make a FilterEdit version for TCustomControl, where filtering happens only through the event handlers.
A configurable fancy syntax like “aaa*bbb” could be added to FilterEdit components. Then it could be used anywhere. However this one looks weird to me. Both normal wildcard and regular expression respect the order of search strings and '*' means any string.
If we look at this, we should break thinks down. Also for filter edit.
The matching itself should go into a (replaceable) TFooBarFilter class.
The class is
- given the filter
- can have settings (in the IDE global prefs could exist, either as options to a filter or to chose a filter class or both)
- has a virtual method: IsTextMatching(AText: String);
It may also have interface methods to get text by attributes. E.g. in the search results, a filter may only match filenames, or only line text. If a filter supports a syntax to allow such choice, then it needs an API to get the data by attribute.
For a filter edit, a list of such names could also be in a context menu, as selectable (radio or check menu) items. To limit what gets searched via menu.
In any case, such a TFilter class can then be used by all TFilterEdit, and any other filter implementation that we may have.