Skip to content

Fold ICSSPropertyHandler2 into ICSSPropertyHandler#4048

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:css-fold-property-handler2
Jun 2, 2026
Merged

Fold ICSSPropertyHandler2 into ICSSPropertyHandler#4048
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:css-fold-property-handler2

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Jun 1, 2026

Same flatten-the-hierarchy pattern as the recent engine merges (#4040, #4042). ICSSPropertyHandler2 added just one capability on top of ICSSPropertyHandler: an onAllCSSPropertiesApplyed callback fired after a whole style declaration is applied. Java 21 default methods make the second interface redundant, so the callback moves onto ICSSPropertyHandler as a no-op default and only the handlers that need it (border, font) override it.

ICSSPropertyHandler2Delegate had no implementors anywhere in the platform tree, so its branch in CSSEngineImpl.applyStyleDeclaration was dead and is dropped in the same pass. Dispatch now collects every applied handler (de-duped, order-preserving) and fires the callback on each.

The bundles are internal (x-friends only), so no API surface changes. Net effect is two fewer interfaces and a simpler property-apply path. css.swt tests still pass.

Contributes to #3980

ICSSPropertyHandler2 added a single capability on top of
ICSSPropertyHandler: a callback the engine fires after every
property in a style declaration has been applied. Java 21 default
methods make the second interface redundant: move the two
onAllCSSPropertiesApplyed defaults onto ICSSPropertyHandler so every
handler picks up a no-op default and only handlers that need the
final-step hook (border, font) override it.

ICSSPropertyHandler2Delegate had no implementations in the platform
tree at all, so its branch in CSSEngineImpl.applyStyleDeclaration was
dead. Drop the interface and the dead branch in the same pass.

CSSEngineImpl.applyStyleDeclaration now collects every applied
ICSSPropertyHandler (de-duped, order-preserving) and fires the
callback on each. The previous singleton-list cache stays, just
keyed on ICSSPropertyHandler instead of ICSSPropertyHandler2.

CSSPropertyBorderSWTHandler and CSSPropertyFontSWTHandler drop their
explicit "implements ICSSPropertyHandler2" since they already
extend ICSSPropertyHandler-compatible bases.

All bundles internal (x-friends only); no API surface changed.

Contributes to eclipse-platform#3980
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Test Results

   864 files  ±0     864 suites  ±0   54m 27s ⏱️ + 2m 44s
 7 990 tests ±0   7 747 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 769 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit b181624. ± Comparison against base commit a6ae91c.

@vogella vogella merged commit bd473bb into eclipse-platform:master Jun 2, 2026
18 checks passed
@vogella vogella deleted the css-fold-property-handler2 branch June 2, 2026 04:55
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