Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 107192

Summary: [extract interface] does not change references in Maps and Lists [refactoring]
Product: [Eclipse Project] JDT Reporter: Manuel Wilde <manuel.wilde>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: benno.baumgartner, dirk_baeumer, robin.rosenberg
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Manuel Wilde CLA 2005-08-17 06:21:29 EDT
I use Eclipse 3.1 on windows xp. After extracting an interface from a class the
Type is not changed in Maps and Lists. It is indifferent wheather the maps/lists
are used in methods as return or input values.
Comment 1 Dirk Baeumer CLA 2005-08-17 08:40:58 EDT
Manuel, do you refer to references like List<TypeToExtractAnInterfaceFrom> ?

Tobias, can you please comment.
Comment 2 Tobias Widmer CLA 2005-08-17 08:49:15 EDT
If you are referring to parameterized types: this is currently not implemented.
If not, could you please give a code snippet or attach a project which 
exhibits the defect?
Comment 3 Dirk Baeumer CLA 2005-08-17 09:13:59 EDT
From Manuel Wilde <manuel.wilde@kgu-consulting.de>

Map<DcAttributeName, AttachedAttributeImpl> attachedAttributes = new
LinkedHashMap<DcAttributeName, AttachedAttributeImpl>();

I extracted an Interface from AttachedAttributeImpl and named it
AttachedAttribute but the reference in the Map and the linked HashMap was not
replaced.
Comment 4 Dirk Baeumer CLA 2005-10-31 13:35:02 EST
Tobias, is this something we can look at for 3.2 ?
Comment 5 Tobias Widmer CLA 2005-11-01 04:17:03 EST
Sure, we decided to skip that in 3.1 for time reasons, but the existing 
infrastructure can be easily extended
Comment 6 Tobias Widmer CLA 2006-04-21 11:44:30 EDT
Not for 3.3
Comment 7 Martin Aeschlimann CLA 2008-05-18 05:04:04 EDT
not for 3.4
Comment 8 Robin Rosenberg CLA 2012-08-26 16:17:21 EDT
A larger example is to grab https://git.eclipse.org/r/#/c/7283/, go to the Repository class and select extract a new interface from the refactoring menu.

It will do wrong in quite a number of places.

-All javadoc references seems unchanged, and wrong
-Some simple references
--fields in DumbClientSmartServerTest are unchanged
--Constructor arguments in Git

Only a few of these errors are expected
Comment 9 Eclipse Genie CLA 2018-10-25 16:09:32 EDT
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.