Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
IDE
Add Component Template
Background compile
Batch file target
Block Completion
Build Tools
Caliber
Class Completion
Class Explorer
Code Browsing
Code Completion
Code Editor
Code Explorer
Code Parameters
Code Templates
Compiler Message Window
Deployment Manager
Dialogs
Direct
Docking
File Browser
File Handling
Form Designer
Help
History View
IDE Insight
Memory Issues
Menu Designer
Menus
Module Manager
Multi-Monitor Support
Object Inspector
Object TreeView
Open Tools API
Packages
Performance
Printing
Project Explorer(old Object Browser)
Project Management
Refactoring
Repository
Save Desktop
Search
Start Page
Starteam
Startup/Shutdown
Structure Pane
System Resources
ToDoList
Tool Palette
Toolbars/Status Line
Translation Tools
Unit Testing
Version Control
VersionInfo
Views
Visual Form Inheritance
Workgroup(PVCS)
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/IDE/Class Completion
[ Add a report in this area ]
Report #:
88569
Status:
Open
Class completion inserts code to the wrong place
Project:
Delphi
Build #:
14.0.3593.25826
Version:
14.0
Submitted By:
David Tetard
Report Type:
Basic functionality failure
Date Reported:
10/1/2010 11:42:50 AM
Severity:
Commonly encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
280659
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
I like to format my procedures the following way, with a header describing its use (which is not an uncommon habit I believe):
// -------------------------------------------------------------------------------------
// This procedure does blah blah blah.
// It returns blah blah blah.
// aParam: This is blah blah blah
Function DoSomething(Const aParam : TXXX) : Integer;
Begin
...
End;
However, when some class methods are inserted (Ctrl + Shift + C), they very often go between the header and the lines of another method (see steps on the right).
Steps to Reproduce:
This is the start unit:
==================================================================
Unit Unit11;
Interface
Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;
Type
TForm11 = Class(TForm)
Private
{ Private declarations }
Public
Procedure aaaa;
Procedure bbbb(Const xxx : String);
procedure cccc;
Procedure Baaa;
End;
Var
Form11: TForm11;
Implementation
{$R *.dfm}
// ----------------------------------------------------------------------------
// This procedure dies blah blah blah.
procedure TForm11.aaaa;
begin
end;
// ----------------------------------------------------------------------------
// This procedure does blah blah blah.
// XXX is blah blah blah.
procedure TForm11.bbbb(Const xxx : String);
begin
end;
// -----------------------------------------------------------------------------
// This procedure does blah blah blah.
// blah blah blah.
procedure TForm11.cccc;
begin
end;
End.
====================================================================================
Now, press Ctrl + Shift + C to have the Baaa procedure automatically inserted in the code. The result is:
// ----------------------------------------------------------------------------
// This procedure dies blah blah blah.
procedure TForm11.aaaa;
begin
end;
// ----------------------------------------------------------------------------
// This procedure does blah blah blah. <=== Description for bbbb
// XXX is blah blah blah.
procedure TForm11.Baaa; <==== Insreted code.
begin
end;
procedure TForm11.bbbb(Const xxx : String); <==== bbbb has lost its header.
begin
end;
// -----------------------------------------------------------------------------
// This procedure does blah blah blah.
// blah blah blah.
procedure TForm11.cccc;
begin
end;
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us