Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338948

Summary: Cancel rename of an attribute and the diagram still gets edited
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: Diagram EditorAssignee: Stefan Dimov <stefan.dimov>
Status: VERIFIED FIXED QA Contact: Stefan Dimov <stefan.dimov>
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.0Flags: stefan.dimov: review+
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Karen Butzke CLA 2011-03-04 10:48:37 EST
In the JPA diagram editor if I rename an attribute that has a compiler error, or JPA validation error, it prompts me if I want to rename. If I cancel the dialog (all 3 dialogs that appear), the diagram itself still gets modified with the new name. I can't figure out a way to rename the attribute at this point, selecting on it does not make it editable like it did before the canceled rename.  I can close the diagram editor without saving and then the diagram is correct and I can rename the attribute.
Comment 1 Stefan Dimov CLA 2011-05-27 10:17:09 EDT
Created attachment 196761 [details]
patch
Comment 2 Stefan Dimov CLA 2011-05-27 10:25:38 EDT
The user cancels an operation, but it's still being performed. That looks bad and should be fixed.

No workaround.

The fix has been tested manually. All the exisiting JUnit tests are passing successfully.

The JDT class RenameSupport throws an InterruptedException when the user cancels the operation. All that the fix is doing is to skip the post-rename operations.

The impact is little and the risk is low.
Comment 3 Neil Hauge CLA 2011-05-27 11:04:40 EDT
I don't think this bug rises to the level of severity needed for RC4.  Bug candidates for RC4 should represent at minimum a major loss in functionality or be a P1 issue, which I would consider this to be only a normal bug.  I also don't think a respin of RC3 is warranted for this issue.  The 3.0.1 maintenance release would be a good target for this type of bug.
Comment 4 Stefan Dimov CLA 2011-05-27 11:13:17 EDT
3.0.1 it is ...
Comment 5 Stefan Dimov CLA 2011-06-27 10:28:28 EDT
patch submitted in HEAD and R3_0_maintenance
Comment 6 Jolene Moffitt CLA 2011-08-16 12:40:53 EDT
Verified in Build I-3.4.0-20110812160550 

Verified if you change the attribute name via the diagram editor and then cancel the name is not updated.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.0.1