Bug 544372 - Intelligent Variable Type Refactoring in Eclipse
Summary: Intelligent Variable Type Refactoring in Eclipse
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.11   Edit
Hardware: PC All
: P3 major with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: ui, usability
Depends on:
Blocks:
 
Reported: 2019-02-12 07:28 EST by Alex K CLA
Modified: 2023-09-29 02:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex K CLA 2019-02-12 07:28:38 EST
As described in this StackOverflow question https://stackoverflow.com/questions/5185480/how-to-refactor-variable-type-in-eclipse/49480340?noredirect=1#comment96089835_49480340

1)I want to refactor code like this:

 	int x=4;
	int y=x;
	System.out.println(y);

How can i do this automatically in Eclipse so x's type promotion to long would cause dependent variables to change their types also:

 	long x=4;
	long y=x;
	System.out.println(y);

?

2)Let's say we have the below code :

int x=4;

public void setX(int newX){
 return x;
}

public int getX(){
 return x;
}

I want when changing the type of (x) from int to long then automatically getters and setters to get updating based on the new type (long) so it becomes :

long x=4;

public void setX(long newX){
 return x;
}

public long  getX(){
 return x;
}


Currently i have to manually go and do it .
Comment 1 Eclipse Genie CLA 2021-02-03 17:10:38 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.
Comment 2 Eclipse Genie CLA 2023-02-13 14:18:12 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.
Comment 3 Matthias Küng CLA 2023-09-29 02:18:58 EDT
Especially for type members this would be very helpful feature