Four Js Development Tools Forum

Discussions by product => Genero Studio => Topic started by: Anderson P. on May 02, 2016, 04:11:27 pm



Title: Search/Replace panel "Text search" usage
Post by: Anderson P. on May 02, 2016, 04:11:27 pm
Lately I have noticed a change of behavior at Genero Studio, whenever making a search I had to save the document before, otherwise it will show me where the expression was before saving. When using the "Replace All" option, it was saying that the document was modified outside Genero Studio and needed to be reloaded.

I got confused because this was not the regular behavior, the "search/replace" panel always considered what was being shown on the code view and now it seemed to be considering what was saved on disk, and the "replace all" never asked to reload the file.

Testing the search/replace panel's options I noticed that the "Text search" option was causing this change of behavior. About this option, the help files only says "Search file as text, not as formatted Genero file". This don't quite explain this behavior.

So I was wondering what is the usage of this option? This can't be only for considering the saved file or the code shown on Studio, so what am I missing?


Title: Re: Search/Replace panel "Text search" usage
Post by: Olivier E. on May 03, 2016, 10:16:33 am
Hello,

May I ask you to precise your OS version and your Genero product version involved please ?

Best regards,

Olivier E.


Title: Re: Search/Replace panel "Text search" usage
Post by: Anderson P. on May 03, 2016, 01:04:56 pm
Olivier, we are using Genero Studio 2.50.20 build-136704 under Windows 7 Professional SP1


Title: Re: Search/Replace panel "Text search" usage
Post by: Bernard M. on May 11, 2016, 09:15:30 am
Hi Anderson,

About the 'Text search' option:

With 'Text search' unchecked: the string to find is searched in the formatted Genero file.
With 'Text search' checked: the string to find is searched in the text file (sort of grep).

Example:
- Run the Hello World project

- 'Text search' unchecked, search for the string gr1, you get one result in the Search Results panel, double-click on it and the Properties panel shows up and focus is one the 'name' property which value is 'gr1'.

- 'Text search' checked search for the string gr1, you get another result in the Search Results panel, double-click on it and the HelloWorld.4fd text file opens in the editor and focus is on the 'gr1' string in this file.

Until GST 2.50 'Text search' would only work on disk files for any kind of files. And for an unknown reason GST 2.50.20 had the 'Text search' checked, which wasn't the default on other GST 2.50 versions.

Starting with GST 3.00 'Text search' works on unsaved files if the files are text files (.4gl, .per, etc.) but still only works on disk files for formatted files (.4fd...) as the corresponding text/xml file isn't generated yet.

For sure, we need to improve the documentation on this subject.

Regards,
Bernard


Title: Re: Search/Replace panel "Text search" usage
Post by: Anderson P. on May 11, 2016, 01:08:25 pm
Bernard, thanks for your reply.

I was also in touch with our consultant, Florencia, about this subject. So as i see this option is only useful on files like screen or report, where "text search" will perform the search on the XML structure instead of screen elements.

As for 4gl files this option is useless, maybe it will be interesting to disable it for this kind of file.

Thanks for your attention.