This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243751 - Refactor - Rename often messes up multiple java files in which the original name occurred.
Summary: Refactor - Rename often messes up multiple java files in which the original n...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 237102 237248 239747 242707 243949 243991 244412 244961 245038 245136 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-11 05:25 UTC by jmsoft
Modified: 2015-03-09 10:22 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmsoft 2014-04-11 05:25:59 UTC
Steps to reproduce:
1. Create an interface, lets say IInterface.
2. Implement or extend the interface in several places.
3. Go back to the IInterface ava file in the editor.
3. Right mouse click Refactor - Rename
4. Rename to IInterfaceNew

-> In several places the rename causes messing up the java files inwhich it occurs.

I have reported Refactor - Rename bugs before but unfortunately I have the distinct impression that it is getting worse instead of better.
Comment 1 Ralph Ruijs 2014-04-22 12:55:23 UTC
*** Bug 243991 has been marked as a duplicate of this bug. ***
Comment 2 Ralph Ruijs 2014-04-30 14:38:54 UTC
PositionRefs are not updated from offsetKind to positionKind when following the steps as described in issue 243991 comment 9.

You can add a breakpoint to org.netbeans.api.java.source.ModificationResult:265
Comment 3 Miloslav Metelka 2014-05-07 14:33:15 UTC
As expected DocmentRenderer.PROCESS_POSITIONS processing is missing I'm still working on an appropriate fix.
Comment 4 Miloslav Metelka 2014-05-09 16:29:11 UTC
jlahoda's patch in issue #228855

        if (getAnyEditor() == null) {
            getPositionManager().documentOpened(openClose.docRef);
        }

does not get triggered since there are existing editors (part of the prerequisites of the reproduction) so I'll attempt to modify the patch to fix the problem.
Comment 5 Miloslav Metelka 2014-05-13 12:03:05 UTC
http://hg.netbeans.org/jet-main/rev/5348eb8014f2
Comment 6 Quality Engineering 2014-05-15 19:37:03 UTC
Integrated into 'main-silver', will be available in build *201405151825* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5348eb8014f2
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #243751 - Refactor - Rename often messes up multiple java files in which the original name occurred..
Comment 7 Ralph Ruijs 2014-05-16 09:38:54 UTC
*** Bug 237102 has been marked as a duplicate of this bug. ***
Comment 8 Ralph Ruijs 2014-05-22 09:46:31 UTC
*** Bug 243949 has been marked as a duplicate of this bug. ***
Comment 9 Ralph Ruijs 2014-06-05 06:55:47 UTC
*** Bug 244412 has been marked as a duplicate of this bug. ***
Comment 10 Ralph Ruijs 2014-07-02 12:32:29 UTC
*** Bug 245038 has been marked as a duplicate of this bug. ***
Comment 11 Ralph Ruijs 2014-07-02 12:33:11 UTC
*** Bug 244961 has been marked as a duplicate of this bug. ***
Comment 12 Ralph Ruijs 2014-07-18 11:31:27 UTC
*** Bug 245136 has been marked as a duplicate of this bug. ***
Comment 13 Ralph Ruijs 2014-09-04 12:11:12 UTC
*** Bug 242707 has been marked as a duplicate of this bug. ***
Comment 14 Ralph Ruijs 2014-10-20 09:41:35 UTC
*** Bug 239747 has been marked as a duplicate of this bug. ***
Comment 15 Ralph Ruijs 2015-03-09 10:22:35 UTC
*** Bug 237248 has been marked as a duplicate of this bug. ***