Skip to content

Make CSS spy selector handling API-version agnostic#2352

Open
vogella wants to merge 2 commits into
eclipse-pde:masterfrom
vogella:css-spy-internal-selector-api
Open

Make CSS spy selector handling API-version agnostic#2352
vogella wants to merge 2 commits into
eclipse-pde:masterfrom
vogella:css-spy-internal-selector-api

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Jun 2, 2026

The CSS spy referenced org.w3c.css.sac.SelectorList and Selector directly, which breaks once eclipse.platform.ui #4051 switches CSSEngine.parseSelectors() and matches() to an internal Selectors AST.

Since both the old and new selector list types expose the same getLength()/item(int) and round-trip cleanly through engine.matches(...), the spy no longer needs to name the type at all. The parsed selectors are now held in var locals and the recursive search takes a Predicate<CSSStylableElement> instead of a typed selector-list parameter (which also drops the always-null pseudo argument). The result compiles against both the current and the post-#4051 target platform, so it can merge independently of the platform change.

vogella and others added 2 commits June 2, 2026 12:06
eclipse.platform.ui PR #4051 changes CSSEngine.parseSelectors() and
matches() to use an internal Selectors AST instead of the org.w3c.css.sac
types. Use var and a Predicate instead of naming the selector list type so
the spy compiles against both the old and new CSSEngine API.
@eclipse-pde-bot
Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From dfd0cd8091b0daa1eed1c312229f3b8b6d69d98f Mon Sep 17 00:00:00 2001
From: Eclipse PDE Bot <pde-bot@eclipse.org>
Date: Tue, 2 Jun 2026 10:18:56 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
index c57a732fbd..5ae26bcc72 100644
--- a/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
+++ b/ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.spy.css;singleton:=true
-Bundle-Version: 0.14.100.qualifier
+Bundle-Version: 0.14.200.qualifier
 Automatic-Module-Name: org.eclipse.pde.spy.css
 Bundle-RequiredExecutionEnvironment: JavaSE-21
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Test Results

  126 files  ±0    126 suites  ±0   35m 59s ⏱️ +8s
3 510 tests ±0  3 456 ✅ ±0   54 💤 ±0  0 ❌ ±0 
9 333 runs  ±0  9 203 ✅ ±0  130 💤 ±0  0 ❌ ±0 

Results for commit 87ed601. ± Comparison against base commit 14ab8d4.

@laeubi
Copy link
Copy Markdown
Contributor

laeubi commented Jun 3, 2026

I'm not sure this really works. This might make it compile time agnostic but I doubt it works in runtime the way indicated here..

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.

3 participants