| Summary: | Do not extend ImportOperation in AbstractExampleInstallerWizard | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Dave Steinberg <davidms> | ||||
| Component: | Core | Assignee: | Dave Steinberg <davidms> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Ed.Merks, marcelop | ||||
| Version: | 2.5.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 253483 | ||||||
| Attachments: |
|
||||||
|
Description
Dave Steinberg
Created attachment 131866 [details]
Fix
Here's a patch that removes the non-API usage of ImportOperation.
Basically, I've replaced createImportOperation(), createDirectoryImportOperation(), and createFileImportOperation() by installProject(), installProjectFromDirectory(), and installProjectFromFile(). Instead of just creating the ImportOperation, these methods actually create the project and run the operation as well (allowing the zip file to be closed afterwards, or any other cleanup that might be needed). I've folded zip handling into installProjectFromFile(), since it doesn't really do anything else -- I couldn't see any justification for yet another a duplicated method, plus this way allows me to open the zip file once less.
All of the existing createImportOperation methods have been deprecated. The existing sequence of calls is preserved to continue to honour any overrides, but in the absence of any overrides ultimately they return null, which causes installExample() to use the new approach.
I've applied the patch and reviewed the changes. They look good! Thanks Marcelo! The fix is in CVS for EMF 2.5. Fix available in HEAD: 2.5.0.I200904211800. Fix available in HEAD: 2.5.0 (R200906151043). |