[Lazarus] Refactoring sometimes does not work - known issue or bug?

Aleksa Todorovic alexione at gmail.com
Wed Mar 10 07:39:46 CET 2010


On Tue, Mar 9, 2010 at 23:32, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> On Tue, 9 Mar 2010 20:56:26 +0100
> Aleksa Todorovic <alexione at gmail.com> wrote:
>
>> On Tue, Mar 9, 2010 at 20:23, Vincent Snijders
>> <vsnijders at vodafonevast.nl> 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.
>
>
>> >> 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.

Thank for this patch. After I parse main file, Find References dialog
shows up, but when I execute it, there is Access Violation. I made
Mantis bug report http://bugs.freepascal.org/view.php?id=15942 with
stack trace of this AV. I'll try to make small example one of these
days.


>
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
Aleksa Todorovic - Lead Programmer
Eipix Entertainment




More information about the Lazarus mailing list