Jump to content
PeterPanettone

More improvements to the Uses Clause Manager

Recommended Posts

Now working on the r2837 source.

 

• In the Favorite tab, the irrelevant Favorite-list popup menu-items are now automatically hidden if the Favorite list is empty:

 

image.png.078040dc492c1e30998aeb3db5653f20.png

 

image.png.bc5a47003d81d7dfc837df9f0f1498fb.png

 

• StatusBar Hint:

 

image.thumb.png.9b723072052b2a8d53762d3342b1a71e.png

 

• Changed StatusBar popup menu wording:

 

image.thumb.png.a735b7a2b92247ccbe59622cf3eaa2bc.png

 

You can download the source here:

 

GX_UsesExpert.zip

 

Edited by PeterPanettone
  • Thanks 1

Share this post


Link to post

I changed the code to disable the irrelevant menu entries rather than hiding them.

Also, I implemented "Open File Location".

 

revision #2841 / 2842

 

There is one problem with the way the status bar code is currently implemented: It calls GxOtaTryFindPathToFile each time which is quite a costly function (try to move the entry with the arrow keys and you will notice a delay. I'm thinking about saving the whole file name instead of just the unit name while scanning for them, so they are available later.

 

Also, it might be more intuitive to copy or move the popup menu entries of the status bar to the already existing popup menus of the lists.

Share this post


Link to post
37 minutes ago, dummzeuch said:

I implemented "Open File Location"

I too.

 

I used this code:

 

procedure TfmUsesManager.OpenLocationAndSelectAFileInExplorer(const AFilePath: string);
// AFilePath may contain spaces
begin
  Winapi.ShellAPI.ShellExecute(Forms.Application.Handle, 'open', 'explorer.exe',
    PWideChar('/select,"' + AFilePath + '"'), nil, Windows.SW_NORMAL);
end;

 

Which code did you use?

Edited by PeterPanettone

Share this post


Link to post
9 minutes ago, dummzeuch said:

I'm thinking about saving the whole file name instead of just the unit name while scanning for them

Good idea.

Share this post


Link to post
14 minutes ago, dummzeuch said:

it might be more intuitive to copy or move the popup menu entries of the status bar to the already existing popup menus of the lists.

In case you want to do that, just COPY them. But will the popup menus of the lists not become too overloaded?

Share this post


Link to post
18 minutes ago, dummzeuch said:

disable the irrelevant menu entries rather than hiding them

I was thinking about this when I implemented the functionality...

Share this post


Link to post
46 minutes ago, PeterPanettone said:

Which code did you use?

Basically the same, but I used the OpenExplorerAndSelectFile function in u_dzOsUtils which encapsulates this to:

  OpenExplorerAndSelectFile(sbUCM.SimpleText);

Share this post


Link to post

Revision #2848

 

Note: I have put the new function into GX_GenericUtils because GX_dzOsUtils is supposed to contain only code from my u_dzOsUtils unit (which is part of dzlib).

Share this post


Link to post
2 hours ago, dummzeuch said:

Revision #2848

 

Note: I have put the new function into GX_GenericUtils because GX_dzOsUtils is supposed to contain only code from my u_dzOsUtils unit (which is part of dzlib).

Thanks for the information.

Share this post


Link to post

Per default, the map file is switched OFF in the project options:  image.png.44baf1a6c699d384c05ec82508a87912.png

 

... while the option to use the map file is switched ON per default in the UCM configuration:

 

image.png.e78c932a666afb3da109e0bb4e5da8f7.png

 

This is INCONSISTENT. Please set the map file per default ON (Segments) in the Project Options.

 

Thank you!

Share this post


Link to post

I would like to implement a FUZZY SEARCH option in Uses Clause Manager. This would be particularly useful in the Identifiers Filter Search.

 

Here are a few possibilities:

 

• Delphi SoundEx

 

• ApproxStrUtils: http://www.gausi.de/approxstrutils-en.html

 

I think that ApproxStrUtils would be more useful for this purpose. It contains these functions:

 

ApproxBestAppearance
ApproxContainsStr
ApproxContainsText
ApproxDistance
ApproxPos
ApproxPosEx
ApproxResemblesText
Check
max
min
min3
PreProcess_FilterCount
SearchBackwards

 

What do you people think?

Share this post


Link to post
14 hours ago, PeterPanettone said:

ApproxStrUtils

I have made some tests: When for example entering "allow no dup" in the Identifiers Filter Search Field then it finds the known Identifier "SNoDuplicatesAllowed" (from the unit Xml.XMLConst.pas).

 

So, this also gives the functionality to use multiple words in the search field! If there are no objections I will implement this (as an OPTION!).

Edited by PeterPanettone

Share this post


Link to post
1 hour ago, dummzeuch said:

Have you checked the license of that library?

You can read the license yourself:

 

The contents of this file are subject to the Mozilla Public License
  Version 1.1 (the "License"); you may not use this file except in
  compliance with the License. You may obtain a copy of the License at
  http://www.mozilla.org/MPL/

 

It is the same license as e.g.: \ExternalSource\OmniXML.pas

 

Here the weather on this Sunday is almost sunny (it seems almost like a TWILIGHT ZONE), good weather for coding...

Edited by PeterPanettone

Share this post


Link to post
2 hours ago, PeterPanettone said:

You can read the license yourself: 

I know I can do that. But you were the one who proposed to use this code so it's your responsibility to check the license.

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
×