[lazarus] ToDo dialog

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Nov 28 05:46:08 EST 2003


On Thu, 27 Nov 2003 18:53:21 -0600  Bob Wingard <bwingard at gt.rr.com> wrote:

> Mattias,
> 
>[...]
> I am glad you guys had this conversation because I was looking into ways
> to determine the unit search path for the find Identifier function that
> Mattias outlined and this little exercise has helped a bunch.

The unit search path for a directory can be retrieved with 

UnitPath:=CodeToolBoss.GetUnitPathForDirectory(Dir);

Same for include and src path:

IncPath:=CodeToolBoss.GetIncludePathForDirectory(Dir);
SrcPath:=CodeToolBoss.GetSrcPathForDirectory(Dir);

The combined Src Path plus Unit Path is

SearchPath:=MergeSearchPaths(SrcPath,UnitPath);


About "Find In Files":
The user should be able to specify the search rules for the files. For
example: all open files, all files in a search path, all project files, all
files of a package, all required packages, all depending packages, ... or
any combination.
The task to gather all needed paths and to finally create the file list,
should be separate from the Find In Files dialog. Maybe in an unit of its
own. I need this also for some other tasks. Even separate from the LCL, so
we can provide some command line tools.

I suggest to define a class TSearchFileRules for this.

Can you do that?
If you think, that's much more work, than you wanted to do, I can do that. I
have to implement some of the package part anyway.


Mattias






More information about the Lazarus mailing list