Skip to content
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

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

soethoff
Copy link
Contributor

@soethoff soethoff commented Apr 3, 2024

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.

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.
@soethoff soethoff force-pushed the swtrenderer-prefs branch from 1a568a9 to f5a282c Compare April 3, 2024 16:07
Copy link
Contributor

github-actions bot commented Apr 3, 2024

Test Results

   918 files  +    1     918 suites  +1   1h 11m 20s ⏱️ + 32m 38s
 7 510 tests ±    0   7 356 ✅  -     1  151 💤 ±  0  3 ❌ +1 
23 679 runs  +1 573  23 171 ✅ +1 453  505 💤 +119  3 ❌ +1 

For more details on these failures, see this check.

Results for commit f5a282c. ± Comparison against base commit 8f59241.

@BeckerWdf
Copy link
Contributor

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?

@soethoff
Copy link
Contributor Author

soethoff commented Apr 4, 2024

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.: org.eclipse.e4.ui.workbench.renderers.swt/SHOW_FULL_TEXT_FOR_VIEW_TABS=true

In your run configuration add the created 'plugin_customization.ini' as 'Program argument':

-pluginCustomization 
<path/to/your/plugin_customization.ini>

Note: The option 'Clear the configuration area before launching' should be enabled

@BeckerWdf
Copy link
Contributor

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.: org.eclipse.e4.ui.workbench.renderers.swt/SHOW_FULL_TEXT_FOR_VIEW_TABS=true

In your run configuration add the created 'plugin_customization.ini' as 'Program argument':

-pluginCustomization 
<path/to/your/plugin_customization.ini>

Note: The option 'Clear the configuration area before launching' should be enabled

That worked. Thanks. It also worked without the "Clear" option.
From my point of view this PR looks good.

@BeckerWdf
Copy link
Contributor

BeckerWdf commented Apr 4, 2024

Failed test are know and already reported:
#275
#1807
#195

@BeckerWdf BeckerWdf merged commit 30af691 into eclipse-platform:master Apr 4, 2024
13 of 16 checks passed
@fedejeanne
Copy link
Contributor

fedejeanne commented Apr 10, 2024

Failed test are know and already reported: #275 #1427 #195

1427 was not correct, the stack traces are different. I edited the comment to avoid confusions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Predefining settings of org.eclipse.e4.ui.workbench.renderer.swt in plugin_customization.ini not possible
4 participants