Jump to content
PeterPanettone

GExpertsGrep.exe

Recommended Posts

Posted (edited)

I have posted this feature request ticket in the GExperts ticket list:

 

https://sourceforge.net/p/gexperts/feature-requests/55/

 

GExpertsGrep.exe has a fantastic feature: It can be started on the command line and pass a directory parameter to it. For example, this command line:

 

"C:\Program Files (x86)\GExperts for RAD Studio 10.3\GExpertsGrep.exe" C:\COMP\_CNScripts

 

...opens this GExperts Grep Search window on my computer:

 

image.png.507a0febad505937384556a332905ad1.png

 

When you double-click on a search result line, then the IDE associated with the respective file type (e.g. .pas) is being automatically opened and the file loaded in the IDE!


The only issue is that the respective source code location of the result is not automatically shown in the IDE source code editor. With this issue solved it would be perfect! Also, another feature would be very helpful: If no IDE is opened the respective result file should be loaded into a pre-configured text editor (of course showing the respective result location line and column and select the search term result).

Edited by PeterPanettone
  • Like 1

Share this post


Link to post
1 hour ago, PeterPanettone said:

When you double-click on a search result line, then the IDE associated with the respective file type (e.g. .pas) is being automatically opened and the file loaded in the IDE!


The only issue is that the respective source code location of the result is not automatically shown in the IDE source code editor. With this issue solved it would be perfect! Also, another feature would be very helpful: If no IDE is opened the respective result file should be loaded into a pre-configured text editor (of course showing the respective result location line and column and select the search term result).

On my computer it does not open the file in the IDE but in Notepad++.

It simply opens the file with the associated application.

And that's the problem: It cannot pass additional parameters for the line number to select, because it does not know which program is called and what to pass for it to jump to the correct line.

The only way to do that would be to configure the program to call and which command line it needs.

(From within GExperts in the IDE this works, because GExperts knows how to jump to a line number within the IDE.)

Share this post


Link to post
2 hours ago, dummzeuch said:

On my computer it does not open the file in the IDE but in Notepad++.

It simply opens the file with the associated application.

And that's the problem: It cannot pass additional parameters for the line number to select, because it does not know which program is called and what to pass for it to jump to the correct line.

The only way to do that would be to configure the program to call and which command line it needs.

(From within GExperts in the IDE this works, because GExpertsknows how to jump to a line number within the IDE.)

So my SUGGESTION is to add this intelligence to GExperts Grep Search:

• If any IDE is open then open the result file in that IDE. (I am not sure whether it is possible to open a source file at a specific location by specifying command-line parameters).

• If no IDE is open AND a text editor has been pre-configured in GExperts Grep Search then the result file should be opened in that text editor.

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
×