Bug 159810

Summary: [add import] replace all similar references at once
Product: [Eclipse Project] JDT Reporter: Steve McKay <smckay>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steve McKay CLA 2006-10-04 17:04:24 EDT
When invoked on a static reference the "Add Import" command replaces the qualified reference with an unqualified reference. All previously qualified references in the open file should be replaced with unqualified references. Currently only the single reference directly operated on by "Add Import" is replaced.

-- Before --

Foo.doBar();
// later
Foo.doBar();

-- After (buggy) --

import static Foo.doBar;
// later
doBar();
// later
Foo.doBar();

-- After (correct) --

import static Foo.doBar;
// later
doBar();
// later
doBar();
Comment 1 Steve McKay CLA 2006-10-04 17:06:53 EDT
*** Bug 159809 has been marked as a duplicate of this bug. ***
Comment 2 Olivier Thomann CLA 2006-10-04 23:47:36 EDT
Moving to JDT/UI
Comment 3 Martin Aeschlimann CLA 2006-10-06 11:01:23 EDT
At the moment you have to go through each reference.