On Feb 5, 2011, at 4:02 PM, Mattias Gaertner wrote:

>  
> 
> Darius Blaszyk <[email protected]> hat am 5. Februar 2011 um 14:55 
> geschrieben:
> 
>>>>> 1. get all the -Fu and -Fi folders so the package can search them and 
>>>>> allow the user to include/exclude them from profiling, which method to 
>>>>> use in LazIDEIntf?
>>> 
>>> I added some info:
>>> 
>>> http://wiki.lazarus.freepascal.org/Extending_the_IDE#Getting_the_search_paths_for_units_and_include_filesuses
>>> CodeToolManager;
>> 
>> Again a couple of questions regarding the IDE interface;
>> 1. Is it possible to (temporarily) suppress the check if a file on disk has 
>> changed?
> 
>  
> No. 
> I could add this, but maybe there are better ways than changing the source 
> back and forth on disk.
> Basically you need a preprocessor for FPC.
> The first step is to extend FPC to not load files directly from disk. I tried 
> some months ago and it was amazingly simple.
> It is quite simple to build your own custom compiler and it uses a central 
> place to load source files. With a simple patch the central loading can be 
> extended for an overload. This costs no performance and has very low 
> maintenance cost for the FPC team, so there is a good chance the patch will 
> be applied. At that time DoDi was working on the compiler, so I waited for 
> the dust to settle and then I forgot to provide the patch. The patch is on 
> another computer. I can search for it next week.
Sounds very promising, I would welcome your sources to see if I can use this in 
fpprofiler.

> A custom compiler can then add the file hook to feed fpc with preprocessed 
> source files, for example your fpfprofile code.
Or even read the files from a stream instead, so the profiling code can be 
inserted on the fly?

> Of course eventually it would be nice if FPC could use an optional 
> preprocessor without the need to compile your own compiler.
I'm for that, sure. But I would also like to be able to use a profiler without 
the need to have to compile a new compiler with different pre-processor. Quite 
some users might find this difficult or even scary.

> Another solution is to implement a ramdisk. That would work with any existing 
> compilers, but requires one implementation per OS and can be tricky because 
> of access rights.
It sounds to difficult to me. Not my prefference, in that case I would rather 
stay with disabling the check in Lazarus for changed files.


>   if FileExistsUTF8(Filename) then   LazarusIDE.DoRevertEditorFile(Filename)  
>  else   LazarusIDE.DoCloseEditorFile(Filename,[cfQuiet]);
>> 2. I would like to add a unit search path to the project and later be able 
>> to remove it again. Is this possible?
> 
>  
> Yes. 
> LazarusIDE.ActiveProject.LazCompilerOptions.OtherUnitFiles
>  
> But the handling of the modified flags can be tricky.
Thanks will examine how this works.

Regards, Darius
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to