Bug 172000 - [Wizards] WizardNewFileCreationPage should support overwriting existing resources
Summary: [Wizards] WizardNewFileCreationPage should support overwriting existing resou...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, contributed, helpwanted
Depends on:
Blocks:
 
Reported: 2007-01-29 08:28 EST by Alexander Fedorov CLA
Modified: 2007-10-29 14:03 EDT (History)
2 users (show)

See Also:


Attachments
setAllowExistingResources method (1.87 KB, patch)
2007-01-29 11:33 EST, Alexander Fedorov CLA
no flags Details | Diff
overwrite warning added (4.06 KB, patch)
2007-03-20 08:36 EDT, Alexander Fedorov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Fedorov CLA 2007-01-29 08:28:09 EST
In the WizardNewFileCreationPage, there should be a method to set allowExistingResources flag for ResourceAndContainerGroup member. It is useful when both "create" and "renew/overwrite" operations are meaningful for a wizard.
Comment 1 Karice McIntyre CLA 2007-01-29 10:23:17 EST
This bug is a good candidate for a contribution from the community.
Comment 2 Alexander Fedorov CLA 2007-01-29 11:33:23 EST
Created attachment 57711 [details]
setAllowExistingResources method

setAllowExistingResources(boolean value) method implementation
Comment 3 Karice McIntyre CLA 2007-01-30 17:05:47 EST
There are a few things missing from this patch:
1. There should be UI (i.e. a checkbox) on the wizard page for this function so the user can choose whether or not to overwrite (false would be the default).   
2. If I set the flag to true, I will overwrite an existing file without warning the user - a warning message should appear in the wizard in this case.
Comment 4 Alexander Fedorov CLA 2007-03-07 08:32:59 EST
WizardNewFileCreationPage is a base class for EMF-generated "New" wizards (at least). Are we sure that everybody will desire to see this new checkbox in UI?
Comment 5 Karice McIntyre CLA 2007-03-07 12:08:48 EST
I agree with your last comment that perhaps some users would not want this option to be visible, but how would a user know if the resources were going to be overwritten or not if we made this flag API?  I am not convinced it would be a good practice to allow that function without some sort of UI indicator and a way for the user to bail out of the overwrite in case it is not desired.  Maybe if you explained the specific use case you had in mind it would be more clear?
Comment 6 Alexander Fedorov CLA 2007-03-20 08:36:38 EDT
Created attachment 61374 [details]
overwrite warning added

point 2) from Comment #3 has been implemented: if "allow overwrite" was set to true, user will get warning instead of error
Comment 7 Tod Creasey CLA 2007-03-20 09:09:52 EDT
This will require new API and will have to wait until after 3.3 as the API is frozen
Comment 8 Tod Creasey CLA 2007-10-11 13:24:44 EDT
Patch released for build >20071011
Comment 9 Tod Creasey CLA 2007-10-29 14:03:04 EDT
WizardNewFileCreationPage