[fpc-pascal] Code tools and changing include file text

Mattias Gaertner nc-gaertnma at netcologne.de
Wed May 13 08:18:52 CEST 2020


On Wed, 13 May 2020 10:48:14 +0700
Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> When a file changes I get the full source text and update the version
> in code tools by doing this:
> 
> Code := CodeToolBoss.FindFile(Path);
> Code.Source := text;
> 
> This works but I'm having problems with include files now because I'm
> updating the code buffer for the include file but the main code
> doesn't seem to get updated. Do I need to notify the main code of
> changes or inject the include code into the main code buffer?

No.

If Path a real filename (absolute, have a full path) you should do
Code.LockAutoDiskRevert, so codetools do no automatically load the
file, when it has changed.

Otherwise:
Can you create an example?

Mattias


More information about the fpc-pascal mailing list