Bug 62719 - import on paste: does not handle clashes [code manipulation]
Summary: import on paste: does not handle clashes [code manipulation]
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 114340 (view as bug list)
Depends on: 71761
Blocks:
  Show dependency tree
 
Reported: 2004-05-18 13:50 EDT by Tom Hofmann CLA
Modified: 2020-02-29 07:11 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2004-05-18 13:50:30 EDT
I20040518-gtk M9 test pass

1. Have these two cus:

========= A.java ==========
import java.util.List;

public class A {
  private List list1;
}


========= B.java ==========
import java.awt.List;

public class B {
  private List list2;
}


2. Copy the member from B to A
3. Note that no import is generated and nothing indicates a problem.

This differs from what is done in this case


========= A.java ==========
import java.util.List;

public class A {
  private List list1;
}


========= B.java ==========

public class B {
  private List list2;
}

class List {
}

1. copy the member from A to B
-> an import is added in B which clashes with the local type "List"

I admit, everything is quite constructed...
Comment 1 Dirk Baeumer CLA 2004-05-18 13:53:12 EDT
Not critical for 3.0.
Comment 2 Martin Aeschlimann CLA 2004-05-18 14:15:55 EDT
I stopped short of implementing that.
We would have to add a qualification to the conflicting type references
-> private java.util.List list2;
But this could also me quite nasty if you didn't want this and have to find 
all the changed places again. The last thing I want is having to offer two 
paste's: smarte paste, normal paste...

not for 3.0
Comment 3 Eclipse Webmaster CLA 2009-08-30 02:39:55 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.
Comment 4 Dani Megert CLA 2011-05-02 07:16:05 EDT
This goes into the similar bucket as bug 71707.

As a minimum we should add the conflicting import so that the user sees that there's a potential conflict. Currently we silently change the semantics.
Comment 5 Dani Megert CLA 2011-05-02 07:16:36 EDT
*** Bug 114340 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Genie CLA 2020-02-29 07:11:33 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.