AVRco Beautifier

final release

  • 1
  • 2
  • 3
  • Page 1 of 3

Poll

what do you think about the new Beautifier ?
very useful
 
1 (16.67%)
useful
 
5 (83.33%)
not of interest
 
0 (0%)
Total votes:6
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

AVRco Beautifier

 · 
Posted: 15.03.2015 - 21:39  ·  #1
@all,

the current AVRco update 5.04.99 contains the final version
of the new Beautifier. Its job is to optically cleanup Pascal
source files. It doesn't change the code generation but only
makes a source much better readable.

The two pictures below show the start button in the PED main
and the Setup button in the IDE General Options dialog.

Ok, the resulting text maybe not in a way what some users
expect what a source should be formatted. It is a matter of taste.
We are eager to hear the user's opinion.

rolf
You must be logged in or your permissions are to low to see this Attachment(s).
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: AVRco Beautifier

 · 
Posted: 16.03.2015 - 14:37  ·  #2
@all,
the user should know how the indent of Types, Const, Var and other define blocks work.
The first appeareance of a ":', ":", '(" etc. defines the indent of the following lines.
If a new Define occurs like Type, const etc. this indent becomes discarded and a new one
begins. See the picture below

rolf
You must be logged in or your permissions are to low to see this Attachment(s).
Lschreyer
Schreiberling
Avatar
Gender: n/a
Posts: 526
Registered: 02 / 2007
Subject:

Re: AVRco Beautifier

 · 
Posted: 21.03.2015 - 13:22  ·  #3
The Beautifier does not work on include-files (*.inc), it expects units only.
Is it possible to change that?
Te old beautifier did also work in inc-files, but the old one if gone now :-(
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2080
Registered: 03 / 2003
Subject:

Re: AVRco Beautifier

 · 
Posted: 22.03.2015 - 13:18  ·  #4
Ich hab ja keine Ahnung, wie der Beautifier funktioniert, aber könnte man da eine Art Interpreter einbauen, der es erlaubt eigene Regeln zu definieren ?.
z.B. If find="then" shift right (2 space) follow text until "EndIf"

.... wenn ein "then" gefunden wird, rücke den folgenden Text 2 Stellen nach rechts, bis das zugehörige "EndIf" gefunden wird.

Kann der Beautifier auch die Schreibweise ändern ?
z.B. ändere alle "begin" zu "Begin" ?

Gruss
Harry
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: AVRco Beautifier

 · 
Posted: 22.03.2015 - 13:36  ·  #5
für Dein spezial Fall , das then kann man natürlich einen Schalter einbauen.
Dann steht bei dir das if einsam in der Gegend rum !

Das if x then ist auch EIN Ausdruck der zusammen gehört, laut Pascal/Modula Specs.
Und ein CodeFolding kann da auch nichts mit anfangen.



Die Groß- und Kleinschreibung kannst du ja unter Capitalization beinflussen.
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2080
Registered: 03 / 2003
Subject:

Re: AVRco Beautifier

 · 
Posted: 22.03.2015 - 14:03  ·  #6
Das sieht ja perfekt aus :) :) :) :) :)
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: AVRco Beautifier

 · 
Posted: 22.03.2015 - 14:05  ·  #7
Hi,

was ich mir wünsche ist eine Beautifier Ein-/Aus-Steuerung per Kommentar-Schalter.
So auf die Art

{$Beauty-}
dieser Block ist nach meinen Vor stellungen formatiert -
hier soll der Beautifier die Finger weg lassen
{$Beauty+}

Allerdings müsste er natürlich in diesem Block enthaltene "begin", "end" usw. zwecks Änderung
der Einrückung berücksichtigen wenn er später wieder darf
Aber er sollte absolut nichts ändern.

Gruß
Gunter
miparo
Administrator
Avatar
Gender:
Location: Germany
Age: 59
Posts: 956
Registered: 09 / 2007
Subject:

Re: AVRco Beautifier

 · 
Posted: 22.03.2015 - 14:32  ·  #8
Hi Gunter,
das braucht man in seltenen Fällen tatsächlich, allerdings kann dieser Block nur ignoriert werden aber nicht weiter analysiert werden.

Das lässt sich sicher machen.

miparo
  • 1
  • 2
  • 3
  • Page 1 of 3
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 17 · Cache Hits: 14   138   152 · Page-Gen-Time: 0.034822s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI