Author Topic: "Find In Files" implemented :)  (Read 7610 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4306
    • Code::Blocks IDE
"Find In Files" implemented :)
« on: May 28, 2005, 06:35:30 pm »
I thought I 'd announce it, since it's the most awaited useful feature :D

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
"Find In Files" implemented :)
« Reply #1 on: May 28, 2005, 09:38:29 pm »
yay!!! :D Congratulations!!! :)

I tested it. Looks cool :) Some caveats tho:
* The line isn't highlighted, is this supposed to be the default behavior?
* After i close CB i get a bunch of "file not found" errors. creepy...  :shock:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4306
    • Code::Blocks IDE
"Find In Files" implemented :)
« Reply #2 on: May 28, 2005, 11:09:12 pm »
Quote
* The line isn't highlighted, is this supposed to be the default behavior?

What line? What do you mean "highlighted"? Selected?

Quote
* After i close CB i get a bunch of "file not found" errors. creepy...

After you perform a search, look in the debug log. It should have relevant messages if it couldn't open some files. Are they correct (as filenames)?

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
"Find In Files" implemented :)
« Reply #3 on: May 29, 2005, 12:06:49 am »
Quote from: mandrav

What line? What do you mean "highlighted"? Selected?


Highlighted as in "caret" or "active line".

Quote from: mandrav

After you perform a search, look in the debug log. It should have relevant messages if it couldn't open some files. Are they correct (as filenames)?


16:56:22: can't open file 'G:\projects\codeblocks\src\devel\share\CodeBlocks\images\codecompletion\README.txt' (error 2: el sistema no puede hallar el archivo especificado.)
16:56:22: can't open file 'G:\projects\codeblocks\src\devel\share\CodeBlocks\plugins\README.txt' (error 2: el sistema no puede hallar el archivo especificado.)
16:56:22: can't open file 'G:\projects\codeblocks\src\devel\share\CodeBlocks\templates\README.txt' (error 2: el sistema no puede hallar el archivo especificado.)
16:56:24: can't open file 'G:\projects\codeblocks\src\src\resources\main_frame.xrc' (error 2: el sistema no puede hallar el archivo especificado.)

(and many others)

All those files (maybe included in the project?) aren't found. I checked. But I see no reason for getting that "not found" message presented as some kind of critical error.

AH HAH! Found the cause.  I replaced with the following code in the FindinFiles function.

BEFORE:
Code: [Select]
       
        for (int i = 0; i < prj->GetFilesCount(); ++i)
        {
            ProjectFile* pf = prj->GetFile(i);
            if (pf)
                filesList.Add(fullpath);
        }


AFTER:

Code: [Select]
       
        wxString fullpath = "";            
        for (int i = 0; i < prj->GetFilesCount(); ++i)
        {
            ProjectFile* pf = prj->GetFile(i);
            if (pf)
            {
                fullpath = pf->file.GetFullPath();
                if(wxFileExists(fullpath))  // Does the file exist?
                    filesList.Add(fullpath);
            }
        }


There!  I just commited the change. No more weird reports at the end :-)

Offline rob

  • Multiple posting newcomer
  • *
  • Posts: 21
    • http://
"Find In Files" implemented :)
« Reply #4 on: May 29, 2005, 03:26:49 am »
GREAT ! Please release a new version as soon as possible !

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
"Find In Files" implemented :)
« Reply #5 on: May 29, 2005, 04:59:19 am »
I'm afraid we can't do that yet... Since we already got the final_beta, we have to fix all bugs before releasing the RELEASE CANDIDATE 1.

However, You can still download from CVS. I added a new tag (version): SNAPSHOT_28052005 (use "update special" from TortoiseCVS to get this specific version).

Offline kjliew

  • Single posting newcomer
  • *
  • Posts: 7
    • http://
Relative path in Search results for "Find in Files"
« Reply #6 on: June 04, 2005, 11:31:55 am »
First and foremost, I would like to express my utmost appreciation to the wonderful developers of CodeBlocks. This IDE is truly amazing!!! For quite some time, I have been looking for an IDE that goes along well with MSYS/MinGW development environment with built-in source level debugging capability, and this is what I found.

MinGW Developer Studio is a very close competitor to CodeBlocks. I used it before I found this one. Too bad, MDS, while is free, is not open-sourced and the developer is slow in adding folder support to Workspace/Project management. CodeBlocks comes in really good in this area, rivalling commercial product from MS.

I was really very disappointed when I discovered that CodeBlocks is lacking "Find in files" capabilities which I regard as a MUST-HAVE for any IDE that's to be put into serious work. Anyway, the CVS source already had it. I built it from SNAPSHOT_28052005 and I was very happy about it. Thank you very much!!!!

To further improve the "File in files" search results readability, relative path should be displayed for files  instead of absolute path. Or, use 2-line approach with 1st line displaying pathname and 2nd line displaying line number and text.

I am looking forward to the final 1.0 released version of CodeBlocks