Menu

JCF 2.10

Due to the confusion as to whether the last release was 2.08 or 2.09, this one is numbered 2.10, read as "two point ten", not as "two point one zero".
Incorporated lextms's patch to the JcfIdeMain.pas unit, to allow it to work in Delphi 2005.
New features:
Added a new warning for procedure/function/method parameters that do not appear to be used in the function body

procedure Foo(i: integer);
begin
ShowMessage('I do not use i');
end;

output is

Parameter i is not used near PROCEDURE in procedure Foo at line 20 col 1

To address various queries and bug reports, I have added options for line breaking conditional compilation directives. You can now specify to add, remove or leave returns before or after compiler directives. This can be set for each of three code places: in uses clauses, in code and elsewhere. Feedback received will determine if these setting will be further broken down - e.g. different line breaking options for {$ENDIF} might be useful.
Delphi.NET support:
The assimilation of Delphi.Net syntax proved to be a lot less troublesome than I had thought. It is mostly complete, with only attributes (i.e. the .Net metadata in square brackets) largely outstanding. Thanks to Lextms for providing the code samples, and code to get the IDE plug-in working in Delphi 2005. Source for this is included, as is the executable, "JcfIde9.bpl"

If you have any short code examples that compile in Delphi.Net, but which the code formatter 2.10 cannot parse, please send them in and I will try to fix them.

The following syntax is now supported:
Class operators, i.e. the following code will parse:

type
TMyClass = class
private
FData: Integer;
public
class operator Add(A,B: TMyClass): TMyClass;
class operator Implicit(A: Integer): TMyClass;
class operator Implicit(A: TMyClass): Integer;

property Data: Integer read FData write FData;
end;

Support for class helpers, i.e. the following code will parse:

type
TMyClass = class
public
procedure HelloMyClass;
end;

TMyClassHelper = class helper for TMyClass
public
procedure HelloMyClassHelper;virtual;
end;

TMyClassHelper2 = class helper(TMyClassHelper) for TMyClass
public
procedure HelloMyClassHelper;override;
end;

Support for nested types, i.e. the following code will parse:

type
TOuterClass = class
private
myField: Integer;
public
type
TInnerClass = class
public
myInnerField: Integer;
procedure innerProc;
end;

procedure outerProc;
end;
Chan

Posted by Anthony Steele 2005-05-22

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.