Skip to content

Scope default theme preference by product or application#3878

Merged
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:product-scoped-theme-preference
Apr 10, 2026
Merged

Scope default theme preference by product or application#3878
vogella merged 2 commits intoeclipse-platform:masterfrom
vogella:product-scoped-theme-preference

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 8, 2026

The default theme preference is now stored under a product-specific (or application-specific) sub-node in user scope. This allows different Eclipse-based products sharing the same user preferences to maintain independent theme defaults.

Changes

  • Theme preference is stored under UserScope/org.eclipse.e4.ui.css.swt.theme/<productId>/themeid
  • Product ID comes from Platform.getProduct().getId()
  • Falls back to eclipse.application system property if no product is configured
  • If neither is available, uses the base node (backwards compatible)
  • Migrates 'Manage default theme' dialog from ConfigurationScope to UserScope for consistency

Files changed

  • E4Application.java - reads product-scoped theme on startup
  • ViewsPreferencePage.java - writes product-scoped theme in preference dialogs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test Results

   852 files  ±0     852 suites  ±0   52m 36s ⏱️ + 1m 38s
 7 894 tests ±0   7 648 ✅ ±0  243 💤 ±0  3 ❌ ±0 
20 184 runs  ±0  19 526 ✅ ±0  655 💤 ±0  3 ❌ ±0 

For more details on these failures, see this check.

Results for commit 215b38e. ± Comparison against base commit 1375cd4.

♻️ This comment has been updated with latest results.

@vogella vogella marked this pull request as ready for review April 8, 2026 18:57
vogella added 2 commits April 10, 2026 12:07
The default theme preference is now stored under a product-specific
(or application-specific) sub-node in user scope. This allows different
Eclipse-based products sharing the same user preferences location to
maintain independent theme defaults.

When reading the preference, the product ID (from Platform.getProduct())
is used as the sub-node key. If no product is configured, the application
ID (eclipse.application system property) is used as fallback. If neither
is available, the preference is stored at the base node level.

This also migrates the 'Manage default theme' dialog from
ConfigurationScope to UserScope to be consistent with the rest of the
theme preference handling.
The dialog now displays which product or application the default theme
applies to, making it transparent that theme defaults are scoped.

Examples:
- With product: 'Current default theme for Eclipse SDK (org.eclipse.sdk.ide): Dark'
- Without product: 'Current default theme for org.eclipse.ui.ide.workbench (org.eclipse.ui.ide.workbench): Dark'
- Without either: falls back to unscoped messages
@vogella vogella force-pushed the product-scoped-theme-preference branch from 5ae3993 to 215b38e Compare April 10, 2026 10:07
@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 10, 2026

Test failures are unrelated #3880

@vogella vogella merged commit 357b87c into eclipse-platform:master Apr 10, 2026
13 of 18 checks passed
@vogella vogella deleted the product-scoped-theme-preference branch April 10, 2026 11:07
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.

1 participant