Searching your Delphi files...#

Yesterday, I asked you guys for a list of Pascal/Delphi parsers. Today I ask you how I should really use it.

What I am going to do...

I am currently writing a indexing filter, that will index your Delphi/Pascal files with the Windows Search Desktop, which comes with MS Windows Vista, and is available for download for Windows XP. The same library can be used with the old indexing service of Windows 9X/ME/200X.

Why I am doing this...

Because I like to find my libraries when I need them. Over the years I have created literally thousands of units and sometimes it just takes a while to find a simple helper function I have written back then... The Windows Desktop Search is great, when you feed it with optimized data. This is what I am going to do for your Pascal/Delphi files.

Does this really work...

You remember ever searching your files and not finding them, though you just know they are there. Well, this is because the Indexing service needs to be told what to index, where to index and how to index. Once you do this, yes, it works, always! I am going to help you with the what and the how for the Pascal files. You just have to determine the where.

How a plan to implement the idea (for now)...

I simply thought I'll parse the interface part of all units (all parts for .dpr and .inc files) and index the name of all classes, types, methods, functions, procedures, properties, constants, variables as keywords. Further I would index the whole declaration of those as well as comments for full-text search.

This way you can search the declarations and the comments of your files on the fly and literally instantly.

How would you implement the idea...

What else should I index - or how should I index those data? Any comments, ideas, etc. are very welcome. I'll plan to release the first beta in January. So let me know what you want.

Thanks for reading, now send me a message ;-)

 

Sunday, December 23, 2007 4:47:09 PM (W. Europe Standard Time, UTC+01:00) #    Comments [8]  | 

 

Google AdSense


Sunday, December 23, 2007 5:24:22 PM (W. Europe Standard Time, UTC+01:00)
I'm not sure all of this is worth your trouble, unless, as you say, you will use it extensively yourself.

I'm quite certain most developers <I>turn off</I> the indexing service because of the resources it consumes.

I have never failed to find something that existed by using good old grep. :)

Cheers
Eddie
Sunday, December 23, 2007 5:31:40 PM (W. Europe Standard Time, UTC+01:00)
As for resources, this isn't as bad as it used to be with the old indexing serivce. The Windows Desktop Search is based upon it, but it is much better, really. And it is a really good to use, once you have set it up to your needs.
Sunday, December 23, 2007 10:13:20 PM (W. Europe Standard Time, UTC+01:00)
I already created tool for searching in delphi sources.

Indexing service was not used. There's own indexing and own pascal parsing.

You can have a look at delphisearch.mistergroup.org and contact me if you have any questions.
Sunday, December 23, 2007 10:37:11 PM (W. Europe Standard Time, UTC+01:00)
Well, when running on Vista, the Desktop Search is really great and since I use it every day, I want my Pascal/Delphi files in there as well. You just press the windows key and enter your search - faster than any tool can be, though a specialized tool is a good idea too. Maybe I'll add an client for it as well, thanks ;-)

Therefore your tool integrates into Delphi. But does it worl outside Delphi as well?
Monday, December 24, 2007 9:01:10 AM (W. Europe Standard Time, UTC+01:00)
I don't know why you want to develop such a software/plugin. Use Total Commander for such tasks. I have been using Total Commander since version 2. It satisfy all the requirements you want to fulfill for MS Desktop Search engine.

Think again....

What is implemented in TC is very simple and really very usable.

Check it out. And use it and you will never want to develop an alternative.

BTW Total Commander is written 100% in Delphi.
Yogi Yang
Monday, December 24, 2007 9:07:58 AM (W. Europe Standard Time, UTC+01:00)
Well, I don't like Total Commander at all. I know the tool and it simply does not suit my taste.

Anyway, please guys, I am not looking for alternatives, I am looking for ideas. So please, state your ideas. I am going to create that plugin and those of you, who will give the Desktop Search a chance might just like it as well. If not, use your tools, I don't mind.

Thanks,
Daniel
Wednesday, December 26, 2007 7:43:06 PM (W. Europe Standard Time, UTC+01:00)
Seems like I remember seeing a really simple hack to make Windows Desktop Search automatically index .pas files as plain text. If you want to use it, then that is what I would do.

What would be great though, is a tool that plugs into Delphi and indexes your source code like you suggested. The advantage to making a tool specific for searching Delphi code is you could do specialized search, like search for an identifier named X in a unit named Y, or look for a method with two specific keywords in it. Being able to do those kinds of searches would be a huge benefit.

Also, if you plugged it directly into Delphi then you could put a window up that showed you where the selected keyword was declared automatically, and if you were on the declaration then you could see where it was used automatically. That is a the beauty of a well indexed search.
Thursday, December 27, 2007 10:41:37 AM (W. Europe Standard Time, UTC+01:00)
The plain text search hack is simple, yes. But as you have noticed, it is not very helpful when you are really want a specific search. I like the idea of being able to search for keywords within a method, though I am right now not sure how to do that, I'll look into it.

A IDE plugin will be a second step, yes. I like this idea just as well. Let's go there step-by-step ;) However, searching for identifiers in specific units, this will come right quick. I love those indexed searches just as much, that's why I've decided to do this plugin.

Thanks for the suggestions, they'll make it into the final at some point. :)
Comments are closed.
All content © 2010, Daniel Wischnewski
On this page
Archives
Promoted Links
Blogroll OPML
My current Flickr Images
www.flickr.com
Dies ist ein Flickr Modul mit �ffentlichen Fotos und Videos von dwischnewski. Ihr eigenes Modul k�nnen Sie hier erstellen.
Recommendations
Sitemap
Special Pages
Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design by Jelle Druyts