Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

(no subject)

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

When you press shift-ctrl-c to add a new method or function, the ide also corrects casing or other 'small' discrepancies between interface and implementation.

While in principle, I am very much a fan of this feature, it is very annoying when you edit older sources in a versioned file: all of a sudden a huge diff is created which hides the 'real' change between all kinds of cosmetic diffs.

For example, I added a function to the fpcunit unit of FPC. I declared the function, pressed CTRL-shift-C so the IDE would complete it, and add 1 line of code. The result is a 60-line diff with 5 lines of real changes, and +/- 55 lines of bogus "changes" (mostly casing, sometimes whitespace).

stuff like (see if you spot the difference, sometimes it's real hard):

-class procedure TAssert.AssertTrue(const AMessage: String; ACondition: Boolean);
+
+class procedure TAssert.AssertTrue(const AMessage: string; ACondition: boolean);

Is there by any chance a way to disable this behaviour ?

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 12 lines
Michael Van Canneyt hat am 23. Februar 2014 um 21:05 geschrieben: [...] When you press shift-ctrl-c to add a new method or function, the ide also corrects casing or other 'small' discrepancies between interface and implementation. While in principle, I am very much a fan of this feature, it is very annoying when you edit older sources in a versioned file: all of a sudden a huge diff is created which hides the 'real' change between all kinds of cosmetic diffs.

It's not so sudden any more. The source editor shows yellow and green spot on the right bar.

Show quoted text 16 lines
For example, I added a function to the fpcunit unit of FPC. I declared the function, pressed CTRL-shift-C so the IDE would complete it, and add 1 line of code. The result is a 60-line diff with 5 lines of real changes, and +/- 55 lines of bogus "changes" (mostly casing, sometimes whitespace). stuff like (see if you spot the difference, sometimes it's real hard): -class procedure TAssert.AssertTrue(const AMessage: String; ACondition: Boolean); + +class procedure TAssert.AssertTrue(const AMessage: string; ACondition: boolean); Is there by any chance a way to disable this behaviour ?

Options / Codetools / Class Completion / Update all method signatures.

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote
It's not so sudden any more. The source editor shows yellow and green spot on the right bar.

With "sudden" I meant that before updating the IDE, this didn't happen. (and yes, I didn't update in a long time)

> > Is there by any chance a way to disable this behaviour ? Options / Codetools / Class Completion / Update all method signatures.

Wonderful, thank you !

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt
Michael Van Canneyt wrote 7 lines
>> >> Is there by any chance a way to disable this behaviour ? > > Options / Codetools / Class Completion / Update all method signatures. Wonderful, thank you !

One of those cases again where I'd like to have the ability to override this per project... for working on the compiler/RTL/etc. I'd like to have this disabled and for my own projects I'd like to have it enabled... (I already reported that some years ago as http://bugs.freepascal.org/view.php?id=18517 )

Regards,
Sven

Reply by email