Show quoted text 12 lines
On Tue, Mar 9, 2010 at 20:23, Vincent Snijders
wrote:
> Aleksa Todorovic schreef:
>>
>> Hi, all!
>>
>> I'm porting my project from Java to FPC/Lazarus, and work a lot in
>> Lazarus. I'm used to really great Refactoring features of Eclipse, and
>> hope Lazarus will have them one day. Now, the problem I have:
>>
>> Sometimes, when I try to use Rename Identifier (or Find Identifier
>> References - it seems like those two features use the same code),
yes
>> I
>> get an error in output window "TCodeToolManager.InitCurCodeTool
>> MainCode=nil".
It means, the IDE thinks this is an include file and it can not find the unit, that includes this file.
I improved the error message in svn revision 23906.
Show quoted text 10 lines
>> Is this known bug, or should I do little more
>> investigation and report it to Mantis? Note that I use lot of include
>> files, which probably cause identifier-search engine to go crazy.
>
> Do the code tools understand what file included the include file? Does
> Search -> Goto include directive work?
>
> If not, open the main file yourself and try again.
I still get the same error in output window.
You must open the unit and "explore" it. For example press ctrl+shift+up.
Reason: Then the IDE will parse the unit and thus the include file too. It will remember this relationship. So you have to do to this only once.
Mattias