Bug 159810 - [add import] replace all similar references at once
Summary: [add import] replace all similar references at once
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 159809 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-04 17:04 EDT by Steve McKay CLA
Modified: 2009-01-23 11:35 EST (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: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.