Bug 159809 - Adding static import with CTRL-SHIFT-M doesn't replace all qualified references with unqualified references
Summary: Adding static import with CTRL-SHIFT-M doesn't replace all qualified referenc...
Status: RESOLVED DUPLICATE of bug 159810
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 17:04 EDT by Steve McKay CLA
Modified: 2006-10-04 17:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***