Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351381 - [move method] Eclipse doesn't log a move refactoring
Summary: [move method] Eclipse doesn't log a move refactoring
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 23:51 EDT by Mohsen Vakilian CLA
Modified: 2019-12-27 15:33 EST (History)
5 users (show)

See Also:


Attachments
The Eclipse project containing the minimal example that demonstrates the bug. (1.77 KB, application/zip)
2011-07-06 23:55 EDT, Mohsen Vakilian CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohsen Vakilian CLA 2011-07-06 23:51:55 EDT
Build Identifier: 20110615-0604

Eclipse fails to log a move instance method refactoring.

Reproducible: Always

Steps to Reproduce:
1. Create a Java project with a Java file called C.java that has the following contents.
  class C1 {
    void m2(C2 c2) {
    }
  }
  class C2 {
  }
2. Select the method m2 in the following program and perform a move refactoring ("Refactor -> Move...") on it to move it to class C2.
3. Eclipse will correctly perform the refactoring but it won't log it in .metadata/.plugins/org.eclipse.ltk.core.refactoring, and, the history dialog at "Refactor -> History..." will be empty.
Comment 1 Mohsen Vakilian CLA 2011-07-06 23:55:50 EDT
Created attachment 199220 [details]
The Eclipse project containing the minimal example that demonstrates the bug.

While working on the CodingSpectator <http://codingspectator.cs.illinois.edu/> plug-in, we came across a problem in logging a move method refactoring. I've described the bug in this issue and attached the Java project of the program I used to describe the problem.
Comment 2 Ayushman Jain CLA 2011-07-07 02:06:28 EDT
Moving to JDT/UI.
Comment 3 Deepak Azad CLA 2011-10-19 01:48:41 EDT
(In reply to comment #0)
> 3. Eclipse will correctly perform the refactoring 
Are you sure ?

When invoked from the Java editor, I get the result as (notice the missing parameter in m2). There is nothing in the error log.
---------------------------------------
class C1 {
}

class C2 {
	void m2() {
	}
}
--------------------------------------

When you move the method via PE, the result is correct and it is also logged in history.
Comment 4 Deepak Azad CLA 2011-10-20 10:12:55 EDT
(In reply to comment #3)
> (In reply to comment #0)
> > 3. Eclipse will correctly perform the refactoring 
> Are you sure ?
Sorry, the result is indeed correct.
 
> When you move the method via PE, the result is correct and it is also logged in
> history.
I had used drag and drop from PE which just does a textual move.
Comment 5 Eclipse Genie CLA 2019-12-27 15:33:05 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.