Hello,
The attachment has 2 projects. One where codetools works as expected and the other one where codetools doesn't. The _only_ difference between the two projects is that in project A, all the files are in the same directory whereas in project B, the unit and the program are in different directories.
Specifically, in project A, the program peb.lpr is in the same directory as winapi.pas (a unit it uses), whereas in project B, peb.lpr is in a sub directory called PEB while the unit winapi.pas is in the parent directory.
The problem is that when the program and the unit are not in the same directory, codetools can no longer figure out where things are. For instance, if you ask it to locate some function, it won't be able to, instead it complains that it cannot find the winapi unit.
The attached file, which demonstrates the problem, should be extracted in a clean directory, it will create subdirectories A & B.
In directory A, compile WinApiBuild using WinApiBuild.lpi, then compile peb using peb.lpi. In any of the files peb uses, tell codetools to find the function emit_LabelAndValue and it will find it without any problem.
In directory B, follow the same steps, compile WinApiBuild using WinApiBuild.lpi then in directory PEB, compile peb using peb.lpi. In any of the files peb uses, tell codetools to find the function emit_LabelAndValue, it will not be able to find it and it will complain that it cannot find winapi.
Also, the problem causes codetools to no longer emit hints about what parameter(s) a function/procedure takes.
Comments and questions welcome.
ETA:
added (s) to the word parameter.