Hi all !
I took time but I'm proud to release ThreadSearch plugin 0.6 :D
It runs finally both on Windows AND Linux (I can not test on other OSs but sources are available :))
Stability is improved a lot.
Quote from: dje on March 13, 2007, 09:52:46 PM
The "ThreadSearch" plugin offers the following features:
- multi-threaded "Search in files"
- preview of the results (left single click on log window)
- file open (left double click on log window)
- check boxes instead of radio boxes to allow searches with both project and directories for example.
- contextual menu "Find occurrences" to start a search in files with the word under cursor (can be activated or not)
Why ?
- I am working on very big projects (700 Mo of cpp, h files) and text searches take up to 5 minutes. It is very frustrating being blocked because of the search. It is now possible to continue editing code during searches.
- I do not like leaving the editor position to browse 'Search in files' resuts. There is now the 'Code preview' to do this with possibility to open the file at the right position.
I massively rewrote the code to solve major problems, ie application hanging on cancel, crash and GUI problems on Linux.
I rewrote my own search classes to avoid the use of GUI items in the worker thread and I use a shared queue in the main thread to cancel quickly a search.
@eranif thanks for your proposition, but I had already rewritten the code when you posted it
Quote from: eranif on April 07, 2007, 03:11:39 AM
Hi dje!,
I recently developed a search thread that supports the following:
- match case
- match whole word
- regular expression
- file extensions
- events and easy interface with the main thread
Source code (5 sources + 1 sample):
http://www.eistware.com/st/SearchThread.zip (http://www.eistware.com/st/SearchThread.zip)
What's new:
- Runs on Linux
- GUI correction on Linux (preview window took more place than available in the notebook page)
- Bug correction by Jamie : the file was not reloaded in the preview window when externally modified
- No crash on very long search (form the root of wxWidgets for example)
- Application does not hang any more on find Cancel
- Added the possibility to hide/show columns header in list control to spare space
- Added the possibility to draw lines to separate columns in list control
- Minor bugs corrections
Limitations :
- On Windows, I put the full path of the files in a small column because tooltips gives it. It does not work on Linux (no tooltip).
- For sure, when user choose to hide list control column headers, colums cannot be resized.
Installation :
- Download the following files:
Windows ThreadSearch 0.6 plugin (http://www.esnips.com/doc/ffca1353-5dc3-410d-b7b7-a37c4bb1730b/Windows-ThreadSearch-plugin) or Linux (Ubuntu) ThreadSearch 0.6 plugin (http://www.esnips.com/doc/e05ae293-4fef-46ad-842c-5044584ae45e/Linux-ThreadSearch-plugin), ThreadSearch.png (http://www.esnips.com/doc/13896624-7adf-4fa3-85ad-2fdedba4a0aa/ThreadSearch) and ThreadSearch-off.png (http://www.esnips.com/doc/247113d7-82bf-4c20-bfe7-72367ef883fd/ThreadSearch-off) - Copy and paste the downloaded pngs in the <...>\CodeBlocks\share\CodeBlocks\images\settings directory
- Click on Plugins/Manage plugins
- Click on Install new and select the downloaded plugin
To build the plugin, extract the source code in src\plugins\contrib\ThreadSearch, open the CodeBlocks project and build it. The .cbplugin is generated in src\plugins\contrib\ThreadSearch and is ready for install.
Thanks to Pecan to inform me on wxListCtrl problems on Linux. Now my code runs on Linux (at least on Ubuntu :))
Thanks to Jamie for code propositions/corrections.
Thanks to users for suggestions and congratulations. They are really appreciated !
I'll write a status concerning future evolutions.
Dje
Just for the record: Where are the sources again? As usual the binary is not compatible with my version of C::B... :-( I guess I missed something...?!
With regards, Morten.
Oups, I forgot the sources link :oops:
It still GPLed !
ThreadSearch 0.6 sources (http://www.esnips.com/doc/c3b7053d-a936-465f-a32e-7eacaa8110e7/ThreadSearchSourceCode0.6)
QuoteAs usual the binary is not compatible with my version of C::B...
The same problem remains... Binary is provided for latest nightly but does not work with debugging environment.
I began working on it but it is not finished. A new target has appeared in the project for debug.
You have to link with the debug static lib instead of the dlls.
Sorry,
Dje
Hi all !
QuoteNews: Better no news than bad news :wink:
No feedback... Does it mean that everything is OK both on Windows and Linux, that this plugin is not interesting or that the weather is too beautiful for developping ?
Dje
Quote from: dje on April 26, 2007, 01:48:47 PM
No feedback... Does it mean that everything is OK [...]
Ooops - sorry, I missed that you had posted the sources... compiling now... ;-)
Quote from: MortenMacFly on April 26, 2007, 02:06:26 PM
Quote from: dje on April 26, 2007, 01:48:47 PM
No feedback... Does it mean that everything is OK [...]
Ooops - sorry, I missed that you had posted the sources... compiling now... ;-)
Reporting back. After having used this plugin "the whole day" - at least for all searched I did - I have to say: Seems to work just fine! The only minor issue I had in the beginning was the following:
I had the ThreadSearch-tab open, but not active. Thus when I selected ThreadSearch from the menu it was hidden! If the tab is visible but *not* active (behind e.g. the build tab) then the menu should better just bring it to front instead of making it invisible. It's misleading otherwise.
Besides that thingy - no other bug to report... sorry! ;-)
With regards, Morten.
I know that point...
I agree with you but I implemented it that way because script console and other are.
The "philosophy" adopted by the view menu seems to be "member of the Messages notebook" and has nothing to do with real visibility of the item.
That is why the item is removed from notebook when not active instead of being activated.
Maybe should I propose two items, one for notebook integration, another one for item activation.
What I don't like is menu overload...
I think there should be a concertation to manage all notebooks pages the same way.
Dje
Quote from: dje on April 26, 2007, 10:44:24 PM
Maybe should I propose two items, one for notebook integration, another one for item activation.
What I don't like is menu overload...
Hmmm... I understand and you're right. The only thing that came into my mind was to use a checked menu item as for the other notebook pages instead. Thus it would be directly visible whether it *is* already visible nut not activated or not...?! What do you think? This would also be conform to the other notebook pages that can be toggled in visibility (e.g. script console...)...
With regards, Morten.
I had open a bug on this point :
bug 5358 (http://developer.berlios.de/bugs/?func=detailbug&bug_id=9438&group_id=5358)
It is now corrected and I didn't apply the correction to behave the same way.
Shame on me !! :oops:
It will be fixed on next release.
I am working for now on the evolutions required by wxWidgets 2.8.3 (at least one change).
I'll probably release two binaries for both wxWidgets versions.
Dje
Hi dje,
I have tried to build Thread Search from sources with wxWidgets 2.8.4 and get a lot of errors during compilation. Is there a new version available that works with wxWidgets 2.8.4?
Bye,
Mario
Hi Mario !
I am working on toolbar integration for now with wxWidgets 2.8.3 (didn't you ask for this ? :wink:).
Next release will integrate it and as soon as it works, I'll probably go on 2.8.4
The only change I did is to replace
bool show = !m_pSizerSearchDirItems->IsShown(m_pSizerSearchDirItems);
by
bool show = !m_pPnlDirParams->IsShown();
But I am quite surprised when you speak about "lots of errors" because there was few problems from 2.6.3 to 2.8.3.
Could you send an informative log ?
Dje
Hi dje,
I changed the source code as you said and removed the event.cpp file from the project and modified the linker settings for wxwidgets 2.8.4.
Now it works fine.
Thanks.
Bye,
Mario
Hi dje,
as codeblocks will be used more and more for embedded programming the default search mask should be *.cpp, *.c, *.h.
Thanks,
Mario
Quoteas codeblocks will be used more and more for embedded programming the default search mask should be *.cpp, *.c, *.h.
OK, no problem, that's done (heavy workload :lol:).
For now it is *.cpp;*.h and current (modified) mask is saved in default.conf.
Dje
Quote from: dje on June 07, 2007, 11:32:12 PM
I am working on toolbar integration for now with wxWidgets 2.8.3 (didn't you ask for this ? :wink:).
Next release will integrate it and as soon as it works, I'll probably go on 2.8.4
The only change I did is to replace
bool show = !m_pSizerSearchDirItems->IsShown(m_pSizerSearchDirItems);
by
bool show = !m_pPnlDirParams->IsShown();
first i did the above change
then i removed the files
\wx\include\wx\event.h
\wx\src\common\event.cpp
from the source files in the project settings
they are obviously not neccessary for building the plugin
finally i could build your fine and useful plugin using wxWidgets 2.8.4
i don't know about any problems with toolbar integration
but it seems basically to work fine.
later on i removed the devel target from the ThreadSearch project,
because i think it isn't necessary
following the rule how all other plugins and CB itself is build,
i think it's better to build the ThreadSearch plugin with debug info (using WX release dll)
and the output tree is stripped off the debug info later on during the update process.
thx for this fine plugin,
brgds tiwag
Quote from: tiwag on June 12, 2007, 01:34:58 PM
then i removed the files
\wx\include\wx\event.h
\wx\src\common\event.cpp
from the source files in the project settings
they are obviously not neccessary for building the plugin
As I often needed to browse events implementation, I put these files in my project and forgot to remove them before delivery.
But I did not include them in build and link processes. They will be removed on next release.
Quote from: tiwag on June 12, 2007, 01:34:58 PM
i don't know about any problems with toolbar integration
but it seems basically to work fine.
A wxToolBar will be available to use the ThreadSearch plugin with the search combobox and buttons and the options buttons.
User will choose to use either toolbar or current controls of the ThreadSearch panel or both.
Using toolbar and removing current controls will spare space on the panel.
Quote from: tiwag on June 12, 2007, 01:34:58 PM
thx for this fine plugin,
Thanks for writing it :D
Dje
Hi Dje,
you should use the great codesnippets browser for accessing files.
Just add a codesnippet and convert it to a file link (location of file) event.cpp. Then drag the snippet item in the open file list and it will be opened in codeblocks editor, otherwise the codesnippet editor is used. Try this it is really cool. It works also with other files e.g pdf Files.
Add a file link to pdf file and configure the extension *.pdf in the environment settings (extension handling) then a pdf reader will be opened if you drag the file link to the open file list.
Bye,
Mario
(see attachment for details).
As the size of attachment is limited to 192K I had to remove the pics and pdf version is to large. Sorry for that.
I would like to provide the pdf version to the codeblocks coummunity, how can I do that.
Bye,
Mario
[attachment deleted by admin]
Hi Mario !
When I do
QuoteJust add a codesnippet and convert it to a file link (location of file) event.cpp.
It overwrites my file !! (SVN 3989)
I can perform what you say by creating a snippet, right click on
properties and click on
Link targetI had never used this plugin but it is true it seems very interesting (thanks Pecan)
QuoteI would like to provide the pdf version to the codeblocks coummunity, how can I do that.
You should put your file on another server, I use esnips (http://www.esnips.com) for my deliveries and I am very satisfied (free, easy to use).
I read parts of it and it looks great ! I think you should create a post, as it is quite different from the subject of this one.
Dje
Quote from: mariocup on June 12, 2007, 03:51:19 PM
...
As the size of attachment is limited to 192K I had to remove the pics and pdf version is to large. Sorry for that.
I would like to provide the pdf version to the codeblocks coummunity, how can I do that.
..
Nice Articles, thanks.
You could upload the pdf to http://savefile.com/ or the like and place a link to the pdf in the wiki.
Or, you could just format and place the whole article in the wiki.
Some recent changes to CodeSnippets allow the user to:
- Drag'n'Drop on Linux just like MSWindows
- Convert to FileLink directly from the context menu, not just from the properties dialog
- You do not have to drag edited FileLinks back from CodeBlocks to CodeSnippets, Because both CodeBlocks and CodeSnippets are linking to the same file. Just do a save after editing.
- You DO have to drag CodeBlocks edited "text only" snippets back to CodeSnippets if you want the text saved. Or just use cut and paste.
- Dragging WorkSpace, Projects, or filenames from CodeBlocks over the top of a CodeSnippets tree root or category will create a new FileLink to that file. You then just use properties to rename the new snippet.
Do this drag relatively slowly so CodeSnippets can see the drag exiting the Opened Files/Management window and have time to create a text/file drag list.
If CodeSnippets is "docked" in CodeBlocks, drag the items entirely out of CodeBlocks (in order to create the drag exit event), then back around into the docked CodeSnippets window.
Hi Pecan,
i will try to make a final version of the document next week. I want to add some additional documentation like how to write a wizard script. The documentation is written in tex, so I can generate html, pdf, chm or other formats. It seems that wiki has no clear specification so I can not generate wiki code and have to use copy and paste.
As soon it is available I will add it also to wiki, but I think chm and pdf for download is also nice. I will post the download link next week.
Regards,
Mario
Quote from: mariocup on June 12, 2007, 04:49:48 PM
Hi Pecan,
i will try to make a final version of the document next week. I want to add some additional documentation like how to write a wizard script. The documentation is written in tex, so I can generate html, pdf, chm or other formats. It seems that wiki has no clear specification so I can not generate wiki code and have to use copy and paste.
As soon it is available I will add it also to wiki, but I think chm and pdf for download is also nice. I will post the download link next week.
Regards,
Mario
http://forums.next.codeblocks.org/index.php/topic,6159.msg47093.html#msg47093