-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support plugin_customization.ini for e4.ui.workbench.renderer.swt prefs #1795
Conversation
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
Before this change, only the InstanceScope was queried explicitly. Therefore, any preferences set in plugin_customization.ini, which end up in the DefaultScope, were never respected. Ideally, we would use org.eclipse.ui.preferences.ScopedPreferenceStore, but that lies in a layer above us, so cannot be used. Instead, we use the org.eclipse.core.runtime.preferences.IPreferencesService when reading preferences. This searches all relevant scopes in the proper order. When writing preferences, we write explicitly into InstanceScope. When performing 'Restore Defaults' in the preference page, we take the DefaultScope into account. Fixes eclipse-platform#1794.
1a568a9
to
f5a282c
Compare
Test Results 918 files + 1 918 suites +1 1h 11m 20s ⏱️ + 32m 38s For more details on these failures, see this check. Results for commit f5a282c. ± Comparison against base commit 8f59241. |
How can I test this with a Run Configuration? So I mean I want to start a target IDE from my workspace (that includes this PR). How do I set the preference value in the run configuration? |
Create a 'plugin_customization.ini' and add one or more settings you want to set as new default, e.g.: In your run configuration add the created 'plugin_customization.ini' as 'Program argument':
Note: The option 'Clear the configuration area before launching' should be enabled |
That worked. Thanks. It also worked without the "Clear" option. |
Before this change, only the InstanceScope was queried explicitly.
Therefore, any preferences set in 'plugin_customization.ini', which end up in the
DefaultScope
, were never respected.Ideally, we would use
org.eclipse.ui.preferences.ScopedPreferenceStore
, but that lies in a layer above us, so cannot be used.Instead, we use the
org.eclipse.core.runtime.preferences.IPreferencesService
when reading preferences. This searches all relevant scopes in the proper order.When writing preferences, we write explicitly into
InstanceScope
.When performing 'Restore Defaults' in the preference page, we take the
DefaultScope
into account.Fixes #1794.