Board index » delphi » new experimental version of GExperts with the code formatter

new experimental version of GExperts with the code formatter


2006-01-14 09:44:30 PM
delphi166
Hi,
It took me a week longer than I thought, but it is there now, a new
experimental version of GExperts with the Code Formatter.
I have fixed the bug that made (* followed by a line feed truncate the
source code and also added support for some new Delphi 2006 language
extensions, in particular the methods and operators for records.
You can download it from www.dummzeuch.de
As always I would like to get feedback.
regards
twm
 
 

Re:new experimental version of GExperts with the code formatter

Thomas Mueller writes:
Quote
As always I would like to get feedback.
DelForEx had a long-standing bug in the if handling.
if then
else
// wrong indent here
if then
else
Is that bug still alive?
Also the {$IFDEF} handing was always inadequate.
It needs its own indent position handling separate from the code indent
position.
{$IFDEF }
type
blablah = record
end;
// this should be aligned to the IFDEF
{$ENDIF}
 

Re:new experimental version of GExperts with the code formatter

Hi Robert,
Robert Marquardt writes:
Quote
DelForEx had a long-standing bug in the if handling.

if then
else
// wrong indent here
if then
else
Is that bug still alive?
It gets indented like this:
if then
else
// wrong indent here
if then
else
Looks OK to me.
Quote
Also the {$IFDEF} handing was always inadequate.
It needs its own indent position handling separate from the code indent
position.

{$IFDEF }

type
blablah = record
end;
// this should be aligned to the IFDEF
{$ENDIF}
That's still as it was. Hm, it shouldn't be too difficult to implement this.
Time for starting to use some bug tracking system so I don't forget...
twm
 

Re:new experimental version of GExperts with the code formatter

Thomas Mueller writes:
Quote
extensions, in particular the methods and operators for records.
...As always I would like to get feedback.
Thanks again Thomas !
Been using last month's version quite a bit with no
problems at all (my comments are all // or plain {}).
I'll try some new record members on this new version
and let you know. Were there any other speciic things
you'd like tested besides records and {* style comments ?
JoeH
 

Re:new experimental version of GExperts with the code formatter

Thomas Mueller writes:
Quote
As always I would like to get feedback.
Hi Thomas,
Thanks for the update. Is it possible to disable the debug window?
--
Andr?Prins
Twain Development
 

Re:new experimental version of GExperts with the code formatter

How does this fit with those that have the original Code Formatter
installed..?
Ian
 

Re:new experimental version of GExperts with the code formatter

Thomas Mueller writes:
Quote
It gets indented like this:

if then
else
// wrong indent here
if then
else

Looks OK to me.
For if then else if ... chains it needs an option to not indent.
if chains are common for the JVCL for the JVCL for example.
Quote
That's still as it was. Hm, it shouldn't be too difficult to implement this.
Time for starting to use some bug tracking system so I don't forget...
Heh Heh Heh :-)
 

Re:new experimental version of GExperts with the code formatter

Hi,
Robert Marquardt writes:
Quote
>It gets indented like this:
>
>if then
>else
>// wrong indent here
>if then
>else
>
>Looks OK to me.
For if then else if ... chains it needs an option to not indent.
if chains are common for the JVCL for the JVCL for example.
So what you want is this?
if ... then
...
else if ... then
...
else if ... then
...
possibly with begin ... end sprinkled in like this:
if ... then begin
...
end else if ... then begin
...
end else if ... then begin
end;
Both are currently possible, use "hanging begin" style for the second one
and turn off "linebreak between else and if" for both.
twm
 

Re:new experimental version of GExperts with the code formatter

Hi Joe,
Joe Hendricks writes:
Quote
>...As always I would like to get feedback.
Been using last month's version quite a bit with no
problems at all (my comments are all // or plain {}).
Sounds good. I am using it all the time, I am too lazy to do any manual
formatting.
Quote
I'll try some new record members on this new version
and let you know. Were there any other speciic things
you'd like tested besides records and {* style comments ?
Nothing in particular. I am not aware of any bugs. There are a few things
that don't work as I'd like them or are not yet configurable and still
a few Delphi 2006 language enhancements that don't work.
twm
 

Re:new experimental version of GExperts with the code formatter

Hi,
Andr?Prins writes:
Quote
>As always I would like to get feedback.
Thanks for the update. Is it possible to disable the debug window?
Darn, I fogot about that one again. No it is not possible to turn it off
it's compile time option. I will try to remember next time.
twm
 

Re:new experimental version of GExperts with the code formatter

Hi,
Ian Branch writes:
Quote
How does this fit with those that have the original Code Formatter
installed..?
Unfortunately there is no way to import your settings. Sorry about that.
That's also on my list of things that would be nice to have.
As for having both installed at the same time: I know of no problems there,
as long as you don't assign the same shortcuts.
twm
 

Re:new experimental version of GExperts with the code formatter

I'll try this soon, since I use the "old" one to reformat code I have
inherited. The one thing I would really like is to be able to use real tabs
for the indenting. I currently have a thing called "entab" (on my web
site) to do this after reformatting, but it can not be hard to change the
"insert n-spaces" to have a tab option I would have thought.
Thanks for considering it! 8-)
/Matthew Jones/