Merge AbstractCSSEngine into CSSEngineImpl#4040
Open
vogella wants to merge 1 commit into
Open
Conversation
The CSS core engine had two stacked abstract classes with no concrete core implementation: AbstractCSSEngine (1,113 LOC) and a tiny CSSEngineImpl (95 LOC) that only added parser-factory wiring, property-handler registration helpers, and the boolean value converter. Inline the small subclass into the base, keep the name CSSEngineImpl since that is the type SWT engine subclasses and tests already reference, and make makeCSSParser concrete (it was abstract solely so CSSEngineImpl could supply its single implementation). The class remains abstract because the CSSEngine.reapply() method has no sensible default in the core bundle. Update ParserTestUtil's parseCssWithoutImports cast and rename AbstractCSSEngineTest to CSSEngineImplTest in the same pass to keep test class names aligned with production class names. The test's anonymous subclass no longer needs to override makeCSSParser since it is now concrete on the base. All bundles internal (x-friends only); no API surface changed. Contributes to eclipse-platform#3980
Contributor
Test Results 864 files ±0 864 suites ±0 50m 44s ⏱️ - 1m 46s Results for commit 9b24ad6. ± Comparison against base commit 1e6a7c9. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both. |
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.
The CSS core engine had two stacked abstract classes with no concrete core implementation:
AbstractCSSEngine(~1,100 LOC) and a tinyCSSEngineImpl(~95 LOC) that only added parser-factory wiring, handler registration helpers, and the boolean value converter. This inlines the small subclass into the base and keeps theCSSEngineImplname, since that is the type the SWT engine subclasses and the tests already reference.makeCSSParserbecomes concrete (it was abstract only so the subclass could supply its single implementation); the class stays abstract becausereapply()has no sensible core default.The result is one fewer class in the engine hierarchy with no behaviour change. All packages are internal (
x-friendsonly), so there is no API impact, and the existing CSS tests pass.Contributes to #3980