| Summary: | Add the ability to File->Save As a currently open file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [SOA] BPMN2Modeler | Reporter: | Robert Brodt <bbrodt> | ||||
| Component: | UI | Assignee: | Robert Brodt <bbrodt> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | deepak.gsd | ||||
| Version: | unspecified | Flags: | bbrodt:
iplog+
|
||||
| Target Milestone: | 0.0.1-M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| URL: | https://issues.jboss.org/browse/JBPM-3292 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Robert Brodt
Created attachment 219415 [details]
BPMN2 Modeler Save As bug fix proposal
Hi, I have attached a solution proposal for this fix. Approach is, 1) When user makes changes to a bpmn file (e.g. process_1.bpmn) and selects save as 2) Get hold of new file (e.g. process_1_rev1.bpmn) from the dialog 3) Create a temporary (e.g. temp.bpmn) file which holds the original/old file contents 4) Save the current bpmn (process_1.bpmn) file 5) Move(IResource.move()) the current file (process_1.bpmn) to new file name(process_1_rev1.bpmn) 6) Move the temp (temp.bpmn)file to old file name (process_1.bpmn) 7) Open the new file editor (process_1_rev1.bpmn) and close the old file (process_1.bpmn) editor I have tested with an existing bpmn file. Open the existing bpmn file editor and try to save as.. and it works. Please have a look at the attached proposal. Let me your feedback on this. Thanks Deepak Thanks for the patch Deepak! I've applied this to the editor code and tested with both helios and indigo builds - looks good! The only thing I had to change was to replace the IFile.move() with an IFile.copy() because it was interfering with the editor's resource listener. I didn't understand the use of a temp.bpmn file (not a good idea, as this file may already exist!) so I simply removed that part of the code. If you have time, please test the new changes to make sure I didn't miss anything. We will publish a new build tomorrow which contains this fix. Thanks! |