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 238271 - [Replace Constructor With Builder] undo doesn't work when default value is set
Summary: [Replace Constructor With Builder] undo doesn't work when default value is set
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 13:12 UTC by ssazonov
Modified: 2016-07-07 07:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Dialog (90.08 KB, image/png)
2013-11-12 13:12 UTC, ssazonov
Details
After refactoring (95.25 KB, image/png)
2013-11-12 13:12 UTC, ssazonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssazonov 2013-11-12 13:12:23 UTC
Created attachment 142092 [details]
Dialog

1. Create new java project and add 2 simple java classes:

package test;

public class ClassA {

	private  int const1;
	private int var1;

	public ClassA(int const1, int var1){
		this.const1 = const1;
		this.var1 = var1;
	}
}

---------------------------------

package test;

public class ClassB {

	private void m1(){
		ClassA ca2 = new ClassA(10,5);
	}
}

2. Close bothe classes and open them again

3. Put caret into "ClassA ca2 = new Cla|ssA(10,5);", where '|' is a position of caret

4. From main menu select Refactor > Replace Bonstructor With Builder, set dialog accordin attached image and pres Refactor

>> When you switch to ClassB, it is impossible to perform Undo
Comment 1 ssazonov 2013-11-12 13:12:47 UTC
Created attachment 142093 [details]
After refactoring
Comment 2 Martin Balin 2016-07-07 07:18:24 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