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

Bug 323796

Summary: [SaveDeltaWizard] Allow to override existing file and suggest containing resource
Product: [Modeling] EMFCompare Reporter: Tatiana Fesenko <tatiana.fesenko>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: cedric.brun, laurent.goubet
Version: unspecifiedKeywords: contributed
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch for "Allow to override existing resources" cedric.brun: iplog+

Description Tatiana Fesenko CLA 2010-08-27 05:20:19 EDT
Helios release: I suggest the following improvements in "Save as EMFDiff" action
1)Allow to override existing file
Now it's not possible. This forces the user to either have plenty of obsolete diff files or to spend time on deleting them. Allowing to overrinde already existing diff file will solve this problem. To inform the user that the file already exists and will be overriden a warning message will be shown.

2)Suggest containing resource
"Save as EMFDiff" action is enabled only for platform resources, it's disabled if one or more files in located in local history or in the repository. Thus, it natural to suggest a containing resource of the first compared file to be a containing resource for EMFDiff.
Comment 1 Tatiana Fesenko CLA 2010-08-27 05:22:10 EDT
Created attachment 177596 [details]
Proposed patch for "Allow to override existing resources"
Comment 2 Tatiana Fesenko CLA 2010-08-27 05:25:29 EDT
For "containing resource" features changes should be done in SaveDeltaWizard#init() method. 
Now it passes empty selection:
   super.init(workbench, new StructuredSelection());
If we pass IResource for the first compared file in the selection it will solve the problem
Comment 3 Laurent Goubet CLA 2011-05-03 08:50:21 EDT
Sorry for the overly long delay on this ... I commited this patch and it will be available in RC1.