Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Refactoring/Extract Method    [ Add a report in this area ]  
Report #:  82497   Status: Need Feedback
Extract method doesn't create a declaration in the class
Project:  Delphi Build #:  11.0.2902.10471
Version:    11.2 Submitted By:   Markus Humm
Report Type:  Basic functionality failure Date Reported:  2/26/2010 4:27:36 AM
Severity:    Commonly encountered problem Last Updated: 3/21/2010 5:10:36 PM
Platform:    All platforms Internal Tracking #:  
Resolution: Need More Info (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
The extract method refactoring forgets to declare that method in the class definition, so even if it otherwise worked ok the code does not compile.

Additional info from my 2nd occurance of this:
I tried to extract some lines as method, but later found that the declaration of it was not placed in the private section of the class where it should belong but I had a type declaration of a simple record. The extract method refactoring now created a private section in this record and added the method there!
Steps to Reproduce:
None
Workarounds
None
Attachment
QC82497.dproj.zip
Comments

Tomohiro Takahashi at 2/27/2010 7:42:30 PM -
Could you please provide sample project to reproduce your issue?

Markus Humm at 3/20/2010 4:19:52 AM -
Hello,

I tried now to provide a sample project for this, using my D2010 licence at home. In D2010 I couldn't reproduce this (at least not with my simple sample project). I added the sample project anyway so maybe it happens just with D2007? Other differences of my sample projects are:

- it's a console type app
- its way less complex than my real source code at work still being maintained with D2007

Tomohiro Takahashi at 3/21/2010 5:10:40 PM -
How should I test attached project with Delphi 2007?

Tomohiro Takahashi at 3/20/2010 7:31:27 PM -
Thanks for the updates. I will check this issue ASAP.

Markus Humm at 3/2/2010 2:47:03 AM -
Hello,

I had the very same problem just now (but my D2007 QC client can't connecvt anymore, maybe a VM issue) and with the web client I can't edit the report so I'm writing my new experience here:

I tried to extract some lines as method, but later found that the declaration of it was not placed in the private section of the class where it should belong but I had a type declaration of a simple record. The extract method refactoring now created a private section in this record and added the method there!

Maybe I can provide some sample app within the next few days.

Server Response from: ETNACODE01