| Summary: | PDE UI doesnt allow plug-in exporting unless target platform environment matches the plug-in platform filter | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Daniel M. Schumacher <danschum> | ||||||||
| Component: | UI | Assignee: | Brian Bauman <baumanbr> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | aniefer, baumanbr, bpasero, dwijenay, emorning, khorowit, mpcarl, tjwatson, wassim.melhem | ||||||||
| Version: | 3.2 | Flags: | wassim.melhem:
review+
|
||||||||
| Target Milestone: | 3.3 RC1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Daniel M. Schumacher
Brian, Issue #2 becomes easier to solve after fixing bug 114642. When the target environment changes, we should do a full non-incremental resolve on the state and recompute the classpaths on all workspace plug-ins. After you're done, reassign the defect to me and I will see what we can do about issue #1 Created attachment 30330 [details]
Patch for Problem #2 (will not fix entire bug)
*** Bug 129180 has been marked as a duplicate of this bug. *** *** Bug 184838 has been marked as a duplicate of this bug. *** *** Bug 185454 has been marked as a duplicate of this bug. *** *** Bug 109132 has been marked as a duplicate of this bug. *** *** Bug 173318 has been marked as a duplicate of this bug. *** Created attachment 67310 [details]
patch for the first problem
This patch will fix the problem of not being able to export a plug-in if its platform filter does not match the current target environment.
The fix is a brilliant idea from Wassim. PluginExportOperation extends the createFeature. It iterates through the objects to be exported to find BundleDescriptions. If a BundleDescription has a conflicting platform filter, we copy our current resolver state, remove the BundleDescription, create a copy (minus the platform filter) and add it back to the resolver state. This allows the bundle to actually be resolved and found by PDE build on export.
The last piece of the fix is PluginExportOperation extending getState(). This function is called when setting the State in PDE Build. The implementation in PluginExportOperation will return the copied state if we had to make a copy.
Wassim, can you review this patch when you get a chance. Created attachment 67325 [details]
refactored patch for first problem
In an effort to minimize the changes to the parent class (since we are later in the development cycle), I duplicated a lot of code in the first patch. This patch cuts down on the code duplication while implementing the same (awesome) algorithm.
Patch works well. Bauman is awesome. Problem #1 was addressed in bug 184041 |