Skip to content

Remove the unreachable reflection-based property handler dispatch - #4215

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:css-drop-reflection-dispatch
Jul 30, 2026
Merged

Remove the unreachable reflection-based property handler dispatch#4215
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:css-drop-reflection-dispatch

Conversation

@vogella

@vogella vogella commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The CSS engine could resolve property handlers two ways: through the propertyHandler extension point, and by reflecting over a naming convention that mapped background-color to a CSSPropertyBackgroundColorHandler class. Only the first is actually used. CSSSWTEngineImpl registers RegistryCSSPropertyHandlerProvider and nothing else, and the reflective providers were reachable only through CSSEngineImpl.registerPackage, registerCSSProperty and registerCSSPropertyHandler, which nothing in the platform calls.

This deletes both providers, the exception only they threw, those three registration methods with their lazy-init helpers, and the test that pinned the naming convention. The similarly named registerCSSPropertyHandlerProvider is untouched, since that is the live provider-level registration point that CSSSWTEngineImpl and third-party engines use.

Net 601 lines removed, and the last naming-convention reflection is gone from the engine, which makes handler resolution something you can read rather than guess at. All affected types are x-internal. Both CSS suites are green locally, 131 in css.core and 210 in css.swt.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Test Results

   858 files   - 3     858 suites   - 3   53m 3s ⏱️ + 2m 53s
 8 129 tests  - 1   7 886 ✅  - 1  243 💤 ±0  0 ❌ ±0 
20 289 runs   - 3  19 635 ✅  - 3  654 💤 ±0  0 ❌ ±0 

Results for commit 2bd3d96. ± Comparison against base commit 036c95f.

This pull request removes 1 test.
org.eclipse.e4.ui.tests.css.core.dom.CSSPropertyHandlerProviderTest ‑ test_getHandlerClassName

♻️ This comment has been updated with latest results.

Production registers exactly one property handler provider: CSSSWTEngineImpl
adds RegistryCSSPropertyHandlerProvider, which is driven by the propertyHandler
extension point. The two alternative providers resolved handlers by reflecting
over a naming convention (background-color to CSSPropertyBackgroundColorHandler)
and were reachable only through CSSEngineImpl.registerPackage,
registerCSSProperty and registerCSSPropertyHandler. Nothing in the platform
calls those three methods, so the whole path was dead.

Delete both providers, the exception only they threw, the three registration
methods with their lazy init helpers, and the test that pinned the naming
convention. The similarly named registerCSSPropertyHandlerProvider stays: it is
the live provider-level registration used by CSSSWTEngineImpl.

This removes the last naming-convention reflection from the engine.
@vogella
vogella force-pushed the css-drop-reflection-dispatch branch from 0c61744 to 2bd3d96 Compare July 30, 2026 11:18
@vogella
vogella marked this pull request as ready for review July 30, 2026 11:18
@vogella
vogella merged commit 2e42a08 into eclipse-platform:master Jul 30, 2026
18 checks passed
@vogella
vogella deleted the css-drop-reflection-dispatch branch July 30, 2026 15:00
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