[Lazarus] Code Completion Templates

Donald Ziesig donald at ziesig.org
Mon Feb 11 02:45:49 CET 2013


On 02/05/2013 02:42 PM, Sven Barth wrote:
> On 05.02.2013 18:30, Mattias Gaertner wrote:
>>
>> Donald Ziesig <donald at ziesig.org> hat am 5. Februar 2013 um 23:16 
>> geschrieben:
>>> Hi All!
>>>
>>> Could anyone point me at the file(s) containing the templates invoked
>>> with Ctrl-Shift-C?
>>>
>>> Specifically I would like to replace the Set<Param> code that 
>>> expands to:
>>>
>>> if(AValue=f<Param>) then exit;
>>> f<Param>=AValue;
>>>
>>> with
>>> Update(f<Param>,AValue); // Keeps track of modifications to the
>>> underlying object.
>>
>> It's hard coded.
>> See components/codetools/codecompletion.pas around line 6730.
>>
>> You can create a feature request or a patch to make this configurable.
>
> This has already been reported by me nearly three years ago: 
> http://bugs.freepascal.org/view.php?id=15922
>
> Regards,
> Sven
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
Hi Again,

I have almost finished a patch that uses an xml file, a new unit and 
mods to codecompletion.pas to implement configurable code completion.

I have a few questions remaining:

1) What is the preferred way to specify the name and location of the xml 
file?  I spent several hours trying to access PrimaryConfigPath or 
SecondaryConfigPath from my unit which is in the codetools package.  
Right now I am testing with a hard-coded path/file name.

2) What is the preferred way to submit the patch? (In my previous life, 
before retirement, all I had to do was submit my code to the Quality 
Control unit and wait for their inevitable nasty-grams; the classic of 
which was "What is this thing called a 'state machine' you have in your 
code?" ;-) ).

3) I have a separate program to parse the xml file and detect any 
possible syntax errors before Lazarus tries to load it.  Where should I 
put that?

Thanks,

Don Ziesig







More information about the Lazarus mailing list