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 208197 - Refactor->Rename occasionally fails, makes file read-only and damages its tab name in editor
Summary: Refactor->Rename occasionally fails, makes file read-only and damages its tab...
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 13:44 UTC by Petr Somol
Modified: 2013-08-28 11:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Rename fails, makes file read only (144.54 KB, image/png)
2012-02-09 13:44 UTC, Petr Somol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Somol 2012-02-09 13:44:56 UTC
Created attachment 115546 [details]
Rename fails, makes file read only

I have observed this several times already in NB7.1. Unfortunately, it occurs irregularly, without apparent reason, usually after long time of editing a java file.

When attempting to rename a method argument by right-click and selecting Refactor->Rename in the pop-up menu, the IDE gets right into the state shown in the attachment. Note the empty tab - the file name vanishes.

The only way forward in such situation is to Cancel out the dialogs, then close the file tab, and reopen it. Luckily the file gets auto-saved before this, however not always to the very latest state. But I never lost more than a couple of lines thus the auto-saved version is apparently not older than a couple of minutes.
Comment 1 Petr Somol 2012-02-09 14:08:19 UTC
Another manifestation of (probably) the same problem:
Again I tried Refactor->Rename on a variable in java source. Immediately after the display of Rename dialog a Message Box popped up asking "Do you want to save changes to file?" (do not remember exact wording). I answered yes, and the file got closed.
Comment 2 Jan Becicka 2012-02-10 09:50:25 UTC
Refactoring just calls LifecycleManager.saveAll on invocation. Refactoring is not yet performed. Reassigning to editor for evaluation
Comment 3 Miloslav Metelka 2013-08-28 11:51:20 UTC
Cannot reproduce the problem (tested both method and variable rename). Hopefully fix of issue #228991 have fixed a race condition that this issue probably was.
If the problem would reappear please reopen the issue.