Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Werkzeuge (https://www.delphipraxis.net/63-sonstige-werkzeuge/)
-   -   CodeFormating für Delphi 2007 (https://www.delphipraxis.net/113258-codeformating-fuer-delphi-2007-a.html)

Markus_Kohl 5. Mai 2008 12:17


CodeFormating für Delphi 2007
 
Hi,
kann mir jemand ein, wenn möglich kostenloses Tool empfehlen für meinen Quelltext in Delphi 2007 zu formatieren..

Gruß
Markus

Sharky 5. Mai 2008 12:20

Re: CodeFormating für Delphi 2007
 
Hai Markus,

erst einmal: "Herzlich Willkommen in der Delphi-PRAXiS".
Zitat:

Zitat von Markus_Kohl
Hi,
kann mir jemand ein, wenn möglich kostenloses Tool empfehlen für meinen Quelltext in Delphi 2007 zu formatieren..

Du kannst Dir ja mal JEDI Code Format ansehen.

toms 5. Mai 2008 12:21

Re: CodeFormating für Delphi 2007
 
:arrow: DelForExp (D2,3,4,5,6,7,9,2007)Version 2.5

RavenIV 5. Mai 2008 12:44

Re: CodeFormating für Delphi 2007
 
Zitat:

Zitat von toms

Den benutze ich auch.
Kann man gut konfigurieren.
Find ich klasse das Tool.

himitsu 5. Mai 2008 12:58

Re: CodeFormating für Delphi 2007
 
Liste der Anhänge anzeigen (Anzahl: 1)
hab mir zwar doch nochmal diese CodeFormatierer angesehn, aber da bleib ich doch lieber bei meiner Handarbeit :?
hat sich in den letzten Jahren nicht viel geändert :angel2:



JEDI Code Format arbeitet garnicht
Zitat:

Formatting file D:\...\FType.pas
Exception TEParseError unexpected token in factor
Near ; near line 138 col 58
Aborted due to error
dieses Semikolon muß aber da sein, denn ohne würde bestimmt der Compiler meckern :stupid:

und DelForExp formatiert vorallem bei den "class operator"'s ganz schlimm
Delphi-Quellcode:
TByteRecEx = packed record
  class Operator Implicit(Value: Byte): TByteRecEx; {$I FInline.}
    class Operator Implicit(Rec: TByteRecEx): Byte; {$I FInline.}
      class Operator Implicit(Value: TByteRec): TByteRecEx; {$I FInline.}
        class Operator Implicit(Rec: TByteRecEx): TByteRec; {$I FInline.}
        public
          case Byte of
            0: (Org: Byte);
            4: (Bin: Byte);
            6: (Bits: TByteSet);
          end;
          TWordRecEx = packed record
            class Operator Implicit(Value: Word): TWordRecEx; {$I FInline.}
              class Operator Implicit(Rec: TWordRecEx): Word; {$I FInline.}
                class Operator Implicit(Value: TWordRec): TWordRecEx; {$I FInline.}
                  class Operator Implicit(Rec: TWordRecEx): TWordRec; {$I FInline.}
                  public
                    case Byte of
                      0: (Org: Word);
                      4: (Bin: Word);
                      5: (Lo, Hi: Byte);
                      6: (Bits: TWordSet);
                      7: (Bytes: TByteArray2);
                    end;
// und das geht so weiter, bis zu weit nach rechts ... aus dem Bild raus
mit der Einrückung hat der echte Probleme


meine Testdatei ist zwar schon "schön" formatiert (jedenfalls find ich es so übersicher)
und sie ist auch fehlerfrei



Aber falls wer doch 'nen CodeFormatierer kennt, welcher mit solchen Dateien kein Problem hat ...
ich wäre bereit mir zumindestens mal dessen formatieren Text anzusehn :angel:

toms 5. Mai 2008 22:06

Re: CodeFormating für Delphi 2007
 
Zitat:

Zitat von himitsu
JEDI Code Format arbeitet garnicht
Zitat:

Formatting file D:\...\FType.pas
Exception TEParseError unexpected token in factor
Near ; near line 138 col 58
Aborted due to error
dieses Semikolon muß aber da sein, denn ohne würde bestimmt der Compiler meckern :stupid:

Tritt der Fehler unter D2007 auf?

himitsu 5. Mai 2008 22:24

Re: CodeFormating für Delphi 2007
 
hab hier nur'n 2006er, aber JCF ist nicht im Delphi installiert.

Dieser Fehler taucht jeweils direkt bei Verwendung von jcfGui.exe und JcfNotepad.exe auf (bei angehängter Testdatei)


der JCF mag wohl solche Codezeilen nicht?
Delphi-Quellcode:
TPoint = {$IFDEF INT_2} TSmallPoint {$ENDIF}  {16:SmallPoint, 32:LongPoint, 64:LargePoint}
         {$IFDEF INT_4} TLongPoint {$ENDIF}
         {$IFDEF INT_8} TLargePoint {$ENDIF};
Das ; am Ende der letzten Zeile ist übrigens die Fehlerstelle.
Komischer Weise gibt es solche Zeilen auch schonmal weiter oben :gruebel:

s-off 6. Mai 2008 06:37

Re: CodeFormating für Delphi 2007
 
Es gibt ein experimental Release der GExperts, das DelForEx bereits integriert hat.

toms_ 6. Mai 2008 06:40

Re: CodeFormating für Delphi 2007
 
Zitat:

Zitat von s-off
Es gibt ein experimental Release der GExperts, das DelForEx bereits integriert hat.

Mal schauen, ob der Code nun schöner formatiert wird:
Zitat:

Apart from integrating it into GExperts I have also done a lot of cleanup and bugfixing to the formatter code. It also knows some of the new (with Delphi 200x) language constructs. Also, this version tries to preserve the bookmarks and breakpoints (which unfortunately doesn't always work).

Wilcox 6. Mai 2008 13:46

Re: CodeFormating für Delphi 2007
 
Hallo Markus,
Hallo Forum,

ist zwar ein alter Thread aber ich wollt hier wenigstens auch eine sinnvolle Alternative zu GExperts oder Jedi vorschlagen.
Schaut euch doch mal die "Code Beautifier Collection for CodeGear RAD Studio" an.

Ich benutze das Tool seit einiger Zeit und auch die anderen Funktionen sind recht nett :)

Viele Grüße sendet

Andreas


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:26 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz