Bug 371944 - [target] Software site (IU) locations don't remember included software settings
Summary: [target] Software site (IU) locations don't remember included software settings
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.8 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-17 15:59 EST by Curtis Windatt CLA
Modified: 2012-02-17 16:33 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2012-02-17 15:59:57 EST
Found while working on bug 351417

1) Create a target definition on the preference page
2) Add a software site location
3) Modify some of the included software settings
4) Hit finish on the the edit software site and edit target definition dialogs (returns to the preference page)
5) Open the same target definition again
Result:
The settings have reverted
Comment 1 Curtis Windatt CLA 2012-02-17 16:05:46 EST
This is because the synchronizer and the IUBundleContainer duplicate the settings. The synchronizer applies to the whole target definition. However, it actually applies to the target's file handle, so all instances of that target share a synchronizer.

When editing a target definition, the preference page must have two target definitions (old and new) to compare. However, loading the original target definition modifies the synchronizer.

Solution will either be to have the synchronizers associate with an instance of a target definition or to modify how we compare the target settings.
Comment 2 Curtis Windatt CLA 2012-02-17 16:33:07 EST
Fixed in master:
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=3c3ab35e380f0a80dcce79977d13bea9eacd7368

Associated synchronizers with the target definition rather than the handles solves the problem. From the looks of the code and comments, this was the original intention of the mapping.