| Summary: | Default Launchers preference settings are not imported | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mario Pierro <mario.pierro> | ||||||
| Component: | Debug | Assignee: | Pawel Piech <pawel.1.piech> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | darin.eclipse, Michael_Rennie, pawel.1.piech, tparker | ||||||
| Version: | 3.5 | Flags: | pawel.1.piech:
review+
Michael_Rennie: review+ darin.eclipse: review+ |
||||||
| Target Milestone: | 3.6 RC2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Mario Pierro
I'll investigate this bug later in the week. (I changed how the launcher preferences are stored in 3.5) Created attachment 168962 [details]
patch
Adds a preference modify listener to reset preferred delegates when debug preferences are imported. This will cause preferred delegates to be re-initialized from the preferences.
Note that the import merges settings, so an imported preferred delegate will replace anything, but we do not *clear* settings when no preferred delegate is imported (the old preference remains). It's harder to clear and questionable as to whether we need/want to.
works alright, +1 Created attachment 169147 [details]
Updated fix.
When testing, the import export still wasn't working for me. I found that if I exported and then imported right away, then the preferences were as before I changed them.
It turns out that the preferences were written out by the launch manager only on shutdown. So when I set the preferences and exported, my settings I just made were not actually being exported. This fix adds a call to persist the delegate preference on each ILaunchConfigurationType.setPreferedDelegate().
The only remaining problem I can see is that I had to also reset the legacy preference whenever any launch config type preferred delegate was set. This shouldn't be a problem in practice, because setPreferredDelegate() is called only from the preference page. But if someone else were to call this public method, it's possible that the legacy preference setting could be lost before the new ones are fully applied.
I think it's good to commit with the additional changes. +1 from myself. I was exporting and importing into different workspaces, so I did not see this in my scenario. Applied/Fixed. Verified. |