This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192580 - [Type Migration] Add ability to refactor the type of a member variable. [70cat]
Summary: [Type Migration] Add ability to refactor the type of a member variable. [70cat]
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 203242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-28 03:46 UTC by esmithbss
Modified: 2016-11-30 14:09 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2010-11-28 03:46:13 UTC
Product Version = NetBeans IDE Dev (Build 201011250001)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01

A very helpful refactoring would be the ability to refactor a member variable's type such that all of it's uses within the class are automatically re-typed as well.

I understand this is a very difficult refactoring due to the internal analysis of the class; however, starting with parameter types for setters/getters, type casts and the variable declaration itself is a great first step.
Comment 1 Geertjan Wielenga 2011-09-11 20:02:44 UTC
I agree, would be great to have this. Now that we're able to change the name of a property and have the names of the getters and setters be updated at the same time, it would be great to also be able to change the TYPE of the property and have the TYPE of the getters and setters be updated at the same time!
Comment 2 Ralph Ruijs 2011-10-20 08:27:55 UTC
*** Bug 203242 has been marked as a duplicate of this bug. ***
Comment 3 Martin Balin 2016-07-07 07:31:42 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 4 joelmob 2016-11-30 14:09:39 UTC
I can reproduce this in NetBeans IDE 8.2 (Build 201609300101). I find no way to refactor the type of a member variable.

Intellij Community have this, if someone want to try to find out how they do it the source can be found here: https://github.com/JetBrains/intellij-community
.

Here is a explanation of Type Migration from Jetbrains, http://www.jetbrains.com/help/idea/2016.2/type-migration.html:
"""
The Type Migration refactoring allows you to automatically change a member type (e.g. from integer to string), and data flow dependent type entries, like method return types, local variables, parameters etc. across the entire project. It also lets automatically convert variable or method return type between arrays and collections. If any conflicts are found IntelliJ IDEA warns you about them.
"""