Time for some collective brainstorming.

Time for some collective brainstorming.

I think everyone who ever worked with Visual Studio knows the "add to using" feature it provides (or called smart tag) - for those that don't: (https://abhijitjana.files.wordpress.com/2010/08/1.png)

Probably everyone agrees that this would be awesome for Delphi - however there are some technical difficulties to overcome.

Afaik in Visual Studio it only works for the assemblies you reference in your project (please correct me if I am wrong here). So that limits the effort it takes to gather all possible symbols and their namespaces to suggest.

In Delphi however there are several ways to reference a unit you have added to the uses: dcu and pas files in the library path of your environment options, dcu and pas files in the search path of your project, pas files explicitly added to the project and units in bpls you might use as runtime packages in your project. Man, that is a lot. However that is not everything. What I frequently encounter at work is following: having to use something, looking for the unit, add that unit to the uses and find out that the project does not yet contain the path to this unit in its search path. So this literally leaves us with possibly the entire harddrive to look for files (ok, we could limit the locations being searched in some settings).

So far so good - now I think everyone can imagine how much time it might take for some people to iterate all files and parse them (let's not talk about how to extract information from dcu and bpl files yet). It might be required to do some indexing of these files to only reparse them when they got changed (no clue what will happen for people that are using VCS and switch branches frequently). So even when indexing and saving all the unit/symbol information in some storage it might take some time to just iterate the possible files to just check if they got modified (right?).

That were just some quick thoughts I had on the subject - I am looking forward for yours.

Comments