Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Class Completion    [ Add a report in this area ]  
Report #:  88512   Status: Open
Ctrl+Shift+C to respect Formatter/Line Breaks/Right Margin
Project:  Delphi Build #:  15.0.3890.34076
Version:    15.0 Submitted By:   Zarko Gajic
Report Type:  Suggestion / Enhancement Request Date Reported:  9/30/2010 1:43:34 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   281145
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Using a wide screen monitor I tend to write method/property declarations in one line (never mind the length of the actual line).

Having Formatter | Line Breaks | Right Margin set to 250  I would like class completion to respect this setting.

Tools|Options|Editor Options|Display|Right Margin setting has no effect.
Steps to Reproduce:
Declare a class with a method declaration longer than 80 characters. Press Ctrl+Shift+C.

Skeleton code for the method is created but breaks in several line (break at 80 characters)


Added by Sysop
<<<<<<<<<<<<<<<<<<<<<<<<
In Delphi, have a custom type:

type
  TMyClass = class
    //ensure this appears in one line
    function SomeFunction(const i: integer; const s : string; const dt : TDateTime) : boolean;
  end;

Hit "ctrl+shift+c" to do class completion.

In the generated skeleton, SomeFunction declaration appears as:

(2 lines)

function TMyClass.SomeFunction(const i: integer; const s: string;
  const dt: TDateTime): boolean;
begin

end;
>>>>>>>>>>>>>>>>>>>>>>>>
Workarounds
Manual "fix" - to have the method skeleton definition be in one line.
Attachment
None
Comments

Iulian Chitan at 9/30/2010 8:52:05 AM -
Hi,
I cannot reproduce your issue. Can you provide a sample project or some more exact steps?
Thank.

Zarko Gajic at 10/4/2010 4:43:47 AM -
Iulian,

In Delphi, have a custom type:

type
  TMyClass = class
    //ensure this appears in one line
    function SomeFunction(const i: integer; const s : string; const dt : TDateTime) : boolean;
  end;

Hit "ctrl+shift+c" to do class completion.

In the generated skeleton, SomeFunction declaration appears as:

(2 lines)

function TMyClass.SomeFunction(const i: integer;
  const s: string; const dt: TDateTime): boolean;
begin
//
end;


I would like the function header to be in one line, as in:

function TMyClass.SomeFunction(const i: integer; const s: string; const dt: TDateTime): boolean;
begin
//
end;


-zarko

Tomohiro Takahashi at 10/4/2010 7:50:37 AM -
Is this issue similar to QC#88567 ?

Zarko Gajic at 11/13/2010 1:22:06 AM -
@Tomohiro: no.

p.s.
Btw, I prefer "procedure" over "Procedure" :)

Server Response from: ETNACODE01