Collapse trivial CTabFolder property handlers into two generic ones#4161
Open
vogella wants to merge 1 commit into
Open
Collapse trivial CTabFolder property handlers into two generic ones#4161vogella wants to merge 1 commit into
vogella wants to merge 1 commit into
Conversation
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
…ndler consolidation)
Contributor
vogella
added a commit
to vogella/eclipse.platform.ui
that referenced
this pull request
Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.