| Summary: | Copy CU should update references in CU | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
| Component: | UI | Assignee: | Adam Kiezun <akiezun> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dlwhiteman, n.a.edgar, peter_burka |
| Version: | 2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
this would introduce 4th level of smartness into our reorg actions: . full - most rename actions (renames symbol and updated all refs to it) . some - in case of renaming a cu with syntax errors we update type declarations and constructors . none - just do it- nothing more would that be really useful? would that not introduce uncecessary user confusion? IMO it doesn't introduce user confusion since the current solution does only half of the job. It renames the type and the constructor but no references inside the type to itself. As a consequence I can't rename the CopyOfA CU into C and get a compilable CU. I still have the bogus reference to A. i'd like to avoid putting renaming code into the copy operation (i'd make thing messy i think. plus, should i do name conflict detection then as well?). i guess, i general, 'copy' is not intended to be very smart. the type declaration and constructor renaming is doen by jcore. maybe removing that and simply renming the file would be acceptable? *** Bug 7490 has been marked as a duplicate of this bug. *** implementing Dirk's original suggestion to update refs inside the cu is the way to go, i think *** Bug 7512 has been marked as a duplicate of this bug. *** *** Bug 14655 has been marked as a duplicate of this bug. *** fixed - references in the copied cu are updated now |
Consider the following case: class A { A a; public A() { } } Copy the CU. You get the following code class CopyOfA { A a; public CopyOfA () { } } Note that the declaration A a; didn't get updated. It would be nice if the copy would also update those references. It does update the top level type name and the constructors.