Bug 234791 - [Refactoring] Bugfix Implement Method Refactoring
Summary: [Refactoring] Bugfix Implement Method Refactoring
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 5.0   Edit
Assignee: Markus Schorn CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-05-30 04:34 EDT by Lukas Felber CLA
Modified: 2009-01-09 17:07 EST (History)
3 users (show)

See Also:


Attachments
solution for the problems desribed in the ticket description (44.43 KB, patch)
2008-05-30 05:02 EDT, Lukas Felber CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Felber CLA 2008-05-30 04:34:45 EDT
Build ID: I20080330-1350

Steps To Reproduce:
1.run ImplementMethod refacotoring on the following code:
class X {
	bool xy(const X*& x, int**** i, int  = 100);
};
2. Apply it and look at the created implementation. Pointer references and const gets lost in the parameters


More information:
solves the following problems:
 * Return value doesn't lose the pointer anymore.
 * Parameters don't lose const reference/pointers anymore.
 * Refactoring now works when caret is behind semicolon of method declaration.

To solve these things the way to create the method implementation had to be adapted (especially the parameter). Parameters are not anymore newly generated (synthetic) but are reused. This means that I had to use several sub-rewrites to prevent node recycling.
The preview on the page became too slow by that process (was generated with every key-press-event). So I had to introduce a delay-component (getDisplay.asyncExec() wasn't enough).
The DelayedJobRunner does this by delaying the execution of a job by a given time (so the generation of the preview will only be triggered when the parameter-name-typing is over).
Comment 1 Lukas Felber CLA 2008-05-30 05:02:35 EDT
Created attachment 102822 [details]
solution for the problems desribed in the ticket description
Comment 2 Markus Schorn CLA 2008-05-30 07:26:14 EDT
Patch applied for 5.0 > 20080530.
Comment 3 Doug Schaefer CLA 2008-06-03 15:22:55 EDT
assigning
Comment 4 Doug Schaefer CLA 2008-06-03 15:23:24 EDT
done