Bug 159809

Summary: Adding static import with CTRL-SHIFT-M doesn't replace all qualified references with unqualified references
Product: [Eclipse Project] JDT Reporter: Steve McKay <smckay>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Steve McKay CLA 2006-10-04 17:04:11 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
Sorry. I'm a bad browser operator.

*** This bug has been marked as a duplicate of 159810 ***