Bug 574502 - Customization of initial DialogSettings for product is broken
Summary: Customization of initial DialogSettings for product is broken
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.18   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.21 M1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-28 10:00 EDT by Andrey Loskutov CLA
Modified: 2021-07-02 11:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2021-06-28 10:00:07 EDT
Bug 511580 added support for dialog settings customization for products, due the nature of the patch (custom product preferences needed) there were no tests added. That was a fault from me.

This feature is now broken again, due the 
change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/166431 / commit 
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8266c76c0792ed71ee13bff1514e3c5cab3f4883 .

The line 112 in DialogSettingsProvider only considers "instance" scope:

https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/166431/18/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/DialogSettingsProvider.java#112

but I see in the debugger that the product customized url is in the "default" scope.

Note, that original code used org.eclipse.ui.PlatformUI.getPreferenceStore().getString("default_dialog_settings_rootUrl") that calls org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet(String) that considers *both* instance AND default scopes for searching, see

org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferenceNodes(boolean).

I plan to push a patch soon.
Comment 1 Wim Jongman CLA 2021-06-28 10:28:50 EDT
I remember discussing this while I made the patch but I can't find that discussion anymore. I'm sorry for the oversight. Let me know if you need help.
Comment 2 Eclipse Genie CLA 2021-06-28 10:33:04 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/182551
Comment 4 Andrey Loskutov CLA 2021-07-02 11:20:13 EDT
Works again.
Comment 5 Wim Jongman CLA 2021-07-02 11:30:37 EDT
(In reply to Andrey Loskutov from comment #4)
> Works again.

Thanks, Andrey! Very much appreciated.