VFPX / GoFish

GoFish is an advanced code search tool for fast searching and replacing of Visual FoxPro source code.
8 stars 7 forks source link

"Hidden" command button for matches in MNX files #101

Closed Jimrnelson closed 7 months ago

Jimrnelson commented 1 year ago

NOT a feature request, this is a feature description.

Learning that there is a match in an MNX file isn't at all helpful for finding where that match occurs in the file.

Thus, there is a not-well-advertised button:

image

This pops up a text file showing an outline of all the menu items, highlighting the menu item of the match.

image

P.S.: I had thought that this worked for MPR files as well, but apparently not.

lscheffler commented 1 year ago

The cmd you show just lists the menu hierarchy. This is of very little help, since it just lists the captions, none of the other fields - or worst, code. The whole MNX search gives very little information.

Update: Guess, I tested with Setup code ... (-‸ლ) Update 2: It does not highlight the Menu Pad entries


I do not see any problem with mpr's. As it is working now, a mpr is opened via Modi File, but only included if you search by folder.


Just an idea

Since there is no way to control the menu designer (one of the worst interfaces of VFP), we might think about an option to additionally parse the MPR fitting, if we have a hit in a MNX. (Or to be true, simply set the mpr fitting a mnx on the list to parse). For project mode only. Or tree way option

This one we could include very simple within the SearchEngine.SearchInProject method. Just some mods to the SQL creating the array.

Jimrnelson commented 1 year ago

This is of very little help, since it just lists the captions

I disagree. It at least identifies what menu item the match occurs in, which is a considerable improvement over what is otherwise available from GF. In my own work, this has certainly been sufficient.

Yes, it's also incomplete and could be improved on. If you do proceed with your suggestion, I would certainly hope you don't consider removing this button.

For project mode only.

What does this mean?

lscheffler commented 1 year ago

I was a bit confused. Found the highlight - on the third try. That's What the updates are about

  1. I picked a string from the mpr - it was from Setup code -> No highlight
  2. I picked the name (or something else) of a Menu Pad -> No highlight
  3. Then I picked a Menu Bar -> Highlight

I agree, this is a bit of help.


I will not touch this button.


For project mode only.   

What does this mean?

The option proposed should work only, if the scope is a project. For scopes folder, it just follows the settings in Advanced.

Jimrnelson commented 1 year ago

This commandbutton should only appear for MNXs, nor MPRs, as it depends on reading the MNX (which internally is a DBF).

That explains at least a few of the things that did not make sense to you.

It should show the highlight for any row in the MNX.

Jimrnelson commented 1 year ago

The option proposed should work only, if the scope is a project. For scopes folder, it just follows the settings in Advanced.

Can you explain again the option you are proposing?

lscheffler commented 1 year ago

This commandbutton should only appear for MNXs, nor MPRs, as it depends on reading the MNX (which internally is a DBF).

That explains at least a few of the things that did not make sense to you.

It should show the highlight for any row in the MNX.

You misread me. Let me explain. I'm not in favour for Menu Designer, needed something to test and picked from the mpr the code snippet from the Setup code. It was shown in the mnx result, as it should, only the button was of no use. Again, there is not much surprise. Never mind.

lscheffler commented 1 year ago

The option proposed should work only, if the scope is a project. For scopes folder, it just follows the settings in Advanced.

Can you explain again the option you are proposing?

In Options form, a new optiongroup. "Process menu (Projects)"

  1. mnx
  2. mnx and mpr
  3. mpr

Since the gathering of the files from the pjx is a simple SELECT SQL, this is easy to do, it just needs to run different SELECTS for each option, all other work is untouched.