Jump to content
PeterPanettone

Uses Clause Manager improved: Filter units with multiple words!

Recommended Posts

Now it is possible to filter Units with multiple words (separated by spaces):

 

image.thumb.png.c728a3a9595114358d6a8b1ef4047988.png

 

image.thumb.png.296ccea6fe6fbd9d9c3889278e0a5123.png

 

image.thumb.png.9d7ac2448b5758ad09665349aa0d086d.png

 

• The number of words is unlimited

• The search is super-fast

• The words can be in any order

• The multi-word-filtering does not need to be activated: Just use a single word as before or any additional words separated by spaces. UCM will automatically decide whether searching for a single word or for multiple words.

 

Here are the sources (based on release r2907) :

 

UsesClauseManager.zip

 

The next improvement will be: Filtering Identifiers with multiple words (tomorrow)

Edited by PeterPanettone
  • Like 2
  • Thanks 1

Share this post


Link to post

OK, I went back to look at your changes in chronological order:

 

The idea is nice, but the implementation - how do I say that without being rude? - suboptimal.

 

Creating a global MultFilter: TStringList variable in GX_GenericUtils which is only used in FilterStringList and if assigned means that the filter parameter will be ignored is not just a code smell, it stinks.

 

Why not have a separate function for this and pass the string list as a parameter to it? Especially since the string list is being populated every time the user enters a new character.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×