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 254662 - [81cat]Redoing a Push Down after undo shows file lock error dialog
Summary: [81cat]Redoing a Push Down after undo shows file lock error dialog
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 15:25 UTC by manikantannaren
Modified: 2015-09-02 16:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (604.73 KB, text/plain)
2015-08-24 15:26 UTC, manikantannaren
Details
Cannot Redo dialog (644.72 KB, image/png)
2015-08-24 15:26 UTC, manikantannaren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description manikantannaren 2015-08-24 15:25:46 UTC
Product Version = NetBeans IDE Dev (Build 201508230002)
Operating System = Mac OS X version 10.10.4 running on x86_64
Java; VM; Vendor = 1.8.0_60-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Test spec: http://services.netbeans.org/synergy/client/app/#/specification/351/v/2
Test case: http://services.netbeans.org/synergy/client/app/#/case/5132/suite/2023/v/1

Please use the sample project from the test spec (attachment will be at the end of the page).

Steps to reproduce
1. Open push_pull.ClassB.java
2. Position caret on method name fact (public int fact)
3. Choose Main menu|Refactor|Push down
4. Enforce the refactor
5. Open push_pull.ClassD.java (ensure that it is the current editor tab)
6. Press Ctrl+Z (CMD+Z)
7. Save ClassD by pressing Ctrl+S(CMD+S)
7. Go back to push_pull.ClassB editor tab
8. press CTRL+Y(CMD+Y)

Expected result
The redo happens effortlessly

Actual result
Error dialog mentioning Cannot redo since ClassD is modified.
Comment 1 manikantannaren 2015-08-24 15:26:02 UTC
Created attachment 155585 [details]
IDE log
Comment 2 manikantannaren 2015-08-24 15:26:59 UTC
Created attachment 155586 [details]
Cannot Redo dialog
Comment 3 -Silver- 2015-08-26 13:25:06 UTC
I can confirm this issue.
It seems that opening ClassB, ClassC and ClassD the undo/redo are linked to the single file and not to the whole change. If you try to switch between the files doing UNDO/REDO and confirming when the dialog appears you can obtain some inconsistencies for example the pushed method disappear from all the files or appears in all of them. Or ClassB has the buttons Undo/Redo disabled, ClassC has only Undo, ClassD only Redo ecc.
Comment 4 Jiri Prox 2015-09-02 10:58:17 UTC
Reproducible
Comment 5 gokumar 2015-09-02 16:11:15 UTC
Link: http://services.netbeans.org/synergy/client/app/#/case/5132/suite/2023

Product Version = NetBeans IDE Dev (Build 201508310002)
Operating System = Linux version 3.16.0-40-generic running on amd64 (Ubuntu)
Java; VM; Vendor = 1.8.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02

I could reproduce this issue.