Skip to content

Collapse trivial CTabFolder property handlers into two generic ones#4161

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-generic-property-handlers
Open

Collapse trivial CTabFolder property handlers into two generic ones#4161
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-generic-property-handlers

Conversation

@vogella

@vogella vogella commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Seventeen handler classes in org.eclipse.e4.ui.css.swt were near-identical boilerplate: each applied one CSS property by calling a single CTabFolder setter (border-visible, swt-maximized, swt-tab-height, ...) or one ICTabRendering renderer setter (keyline colors, tab outline, ...). This replaces them with two data-driven handlers that dispatch on the property name through a small lookup map, one for direct folder setters and one for renderer setters. Net effect is about 690 lines less code, and adding a future simple property becomes a map entry plus a plugin.xml line instead of a new class.

Behavior is unchanged: the per-property value guards were carried over as-is, and plugin.xml still registers every property name individually on CTabFolderElement, so downstream overrides via the propertyHandler extension point resolve at the same granularity as before.

Part of #3980.

Seventeen near-identical handler classes in css.swt each applied one
CSS property by calling a single CTabFolder or ICTabRendering setter.
Replace them with two data-driven handlers:
CSSPropertyCTabFolderSWTHandler maps property names to folder setters
(ten boolean, two int) and CSSPropertyCTabFolderRendererSWTHandler
maps them to renderer setters (four color, one boolean). The
per-property value guards are kept as before, and plugin.xml still
registers each property name individually, so overrides contributed
through the propertyHandler extension point resolve exactly as they
did with the dedicated classes.
vogella added a commit to vogella/eclipse.platform.ui that referenced this pull request Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  +   22     855 suites  +23   47m 39s ⏱️ + 21m 26s
 8 102 tests ±    0   7 859 ✅ ±    0  243 💤 ±  0  0 ❌ ±0 
20 208 runs  +3 140  19 554 ✅ +2 897  654 💤 +243  0 ❌ ±0 

Results for commit 035fd60. ± Comparison against base commit 8603a98.

vogella added a commit to vogella/eclipse.platform.ui that referenced this pull request Jul 4, 2026
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