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 233590 - Refactor for renaming in C/C++ remote development is not renaming the actual word we selected. Occurences in other places are properly renamed.
Summary: Refactor for renaming in C/C++ remote development is not renaming the actual ...
Status: RESOLVED DUPLICATE of bug 236271
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3.1
Hardware: PC All
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-29 12:34 UTC by sreekar545
Modified: 2013-09-25 08:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (52.94 KB, text/plain)
2013-07-29 12:35 UTC, sreekar545
Details
More up to date stack (7.53 KB, text/plain)
2013-08-19 14:20 UTC, Vladimir Kvashin
Details
Partial fix (2.82 KB, patch)
2013-08-19 17:32 UTC, Vladimir Kvashin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sreekar545 2013-07-29 12:34:56 UTC
When I selected a class variable to rename then it does the refactor and rename but not the one I selected (I mean the one under the cursor)

Product Version = NetBeans IDE 7.3.1 (Build 201306052037)
Operating System = Windows Server 2008 R2 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Comment 1 sreekar545 2013-07-29 12:35:06 UTC
Created attachment 137941 [details]
IDE log
Comment 2 Vladimir Kvashin 2013-08-19 14:19:57 UTC
I see the same behaviour in (7.4) trunk
Comment 3 Vladimir Kvashin 2013-08-19 14:20:27 UTC
Created attachment 138867 [details]
More up to date stack
Comment 4 Vladimir Kvashin 2013-08-19 14:58:35 UTC
The root cause is

java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.<init>(File.java:395)
at org.openide.util.Utilities.toFile(Utilities.java:3156)
at org.netbeans.modules.refactoring.spi.BackupFacility2$DefaultImpl.storeChecksum(BackupFacility2.java:226)
at org.netbeans.modules.refactoring.spi.BackupFacility2$DefaultImpl.access$100(BackupFacility2.java:211)
at org.netbeans.modules.refactoring.spi.BackupFacility2$DefaultHandle.storeChecksum(BackupFacility2.java:193)
...


which corresponds to issue #230219, which I've just reopened
Comment 5 Vladimir Kvashin 2013-08-19 17:32:17 UTC
Created attachment 138879 [details]
Partial fix

The attached fix fixes this particular issue, so at least refactoring - but not undo - works. But Undo causes the same exception. The reason is: BackupFacility2 is too java.io.File oriented.
Comment 6 Vladimir Kvashin 2013-08-19 17:34:39 UTC
(in reply to comment #5)
> Partial fix...
This meant to go to the issue #230219 (this one depends on), sorry.
Comment 7 Vladimir Kvashin 2013-09-23 08:42:24 UTC

*** This bug has been marked as a duplicate of bug 230219 ***
Comment 8 Ralph Ruijs 2013-09-23 09:39:49 UTC
From #230219



Steps to reproduce are as follows

- You need a Linux or Mac host to use as a remote host. If your laptop/desktop is Linux or Mac you can easily fool Netbeans and make it use as remote one.

- Unpack the attached test project somewhere in your home directory on that host.

- Launch IDE, activate C/C++

- Select "Services" pane, click "Add New Host" on "C/C++ Build Hosts"

- If you are on Linux or Mac, you can enter just "localhost" as host name, it will go to your local host as if it was remote (via ssh); if you are on Windows you need to specify a remote Linux or Mac host. This host should already have test project unpacked.

- After wizard finishes, select the newly added host, invoke "Open Project...", select test project and open it

- In Projects tab, find and open "args.c" in this project

- See that undo/redo works OK. Try renaming "main" function. Exception occurs. Undo does not work after that.
Comment 9 Ralph Ruijs 2013-09-25 08:25:22 UTC
Multiple issues for tracking the same bug.

*** This bug has been marked as a duplicate of bug 236271 ***