Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
62c792e
Remove unnecessary Apply and close button in property dialog
elsazac May 8, 2026
75797b1
Fix sticky scroll height calculation for variable line heights
Christopher-Hermann May 6, 2026
8ad0c90
Version bump(s) for 4.41 stream
eclipse-platform-bot Jun 1, 2026
55391d7
Merge AbstractCSSEngine into CSSEngineImpl
vogella May 7, 2026
9f96bf3
Allow platform:/plugin/ URIs in templates extension include element
tobias-melcher May 26, 2026
edbad22
Fix multiline code mining height alignment with text widget lines
tobias-melcher May 29, 2026
ff1f1b7
Version bump(s) for 4.41 stream
eclipse-platform-bot Jun 1, 2026
a6ae91c
Merge AbstractCSSSWTEngineImpl into CSSSWTEngineImpl
vogella May 7, 2026
59cc8cc
Add tests for find/replace UI history store and overlay
HeikoKlare May 14, 2026
bd473bb
Fold ICSSPropertyHandler2 into ICSSPropertyHandler
vogella May 7, 2026
52d8fa8
Use java.text.BreakIterator in DefaultTextDoubleClickStrategy
vogella May 7, 2026
942953b
Drop unused PropertyHelper and its self-test
vogella May 7, 2026
ad566d1
Fix warnings in test plugins
HeikoKlare May 14, 2026
bacf493
Migrate OpenProjectExplorerFolderTest to JUnit 5
vogella May 15, 2026
bf35645
Introduce internal CSS Selector AST and matcher
vogella May 7, 2026
ee65437
Drop SAC types from the CSS engine API and matcher
vogella May 7, 2026
28e33ab
Add CSS engine tracing for theme-swap performance analysis
vogella May 21, 2026
497c1ac
Add CssThemeSwapPerformanceTest workbench benchmark
vogella May 21, 2026
36a2616
docs: document CSS engine performance baseline and benchmarks in CSS-…
vogella May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
478 changes: 478 additions & 0 deletions CSS-rework.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions bundles/org.eclipse.e4.ui.css.core/.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Debugging options for the org.eclipse.e4.ui.css.core plugin.

# Master switch. Must be true for any of the more specific debug
# options below to take effect.
org.eclipse.e4.ui.css.core/debug=false

# Accumulate per-phase timings inside the CSS engine (applyStyles,
# getComputedStyle, selector match, applyStyleDeclaration,
# applyCSSProperty) and print a summary to stdout after each
# top-level applyStyles call. Useful for measuring where time goes
# during a theme swap. Has no effect unless the master "debug"
# option is also true.
org.eclipse.e4.ui.css.core/debug/perf=false
3 changes: 2 additions & 1 deletion bundles/org.eclipse.e4.ui.css.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Export-Package: org.eclipse.e4.ui.css.core;x-internal:=true,
org.eclipse.e4.ui.css.core.impl.dom;x-internal:=true,
org.eclipse.e4.ui.css.core.impl.dom.parsers;x-internal:=true,
org.eclipse.e4.ui.css.core.impl.dom.properties;x-friends:="org.eclipse.e4.ui.css.swt",
org.eclipse.e4.ui.css.core.impl.engine;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.workbench.swt",
org.eclipse.e4.ui.css.core.impl.engine;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.tests.performance",
org.eclipse.e4.ui.css.core.impl.engine.selector;x-friends:="org.eclipse.e4.ui.tests.css.core",
org.eclipse.e4.ui.css.core.impl.sac;x-internal:=true,
org.eclipse.e4.ui.css.core.resources;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.workbench.renderers.swt",
org.eclipse.e4.ui.css.core.sac;x-internal:=true,
Expand Down
3 changes: 2 additions & 1 deletion bundles/org.eclipse.e4.ui.css.core/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
about.html,\
plugin.properties
plugin.properties,\
.options
src.includes = schema/,\
apache_about_files/,\
about.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2013 Angelo Zerr and others.
* Copyright (c) 2008, 2026 Angelo Zerr and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -13,8 +13,7 @@
*******************************************************************************/
package org.eclipse.e4.ui.css.core.dom;

import org.w3c.css.sac.Selector;
import org.w3c.css.sac.SelectorList;
import org.eclipse.e4.ui.css.core.impl.engine.selector.Selectors;
import org.w3c.dom.css.CSSRule;

/**
Expand All @@ -28,7 +27,7 @@ public interface ExtendedCSSRule extends CSSRule {
public CSSPropertyList getCSSPropertyList();

/**
* Return the list of {@link Selector} of this {@link CSSRule}.
* Return the list of selectors of this {@link CSSRule}.
*/
public SelectorList getSelectorList();
public Selectors.SelectorList getSelectorList();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2018 Angelo Zerr and others.
* Copyright (c) 2008, 2026 Angelo Zerr and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -15,9 +15,6 @@
package org.eclipse.e4.ui.css.core.dom;

import java.util.EventListener;
import java.util.List;
import org.w3c.css.sac.Condition;
import org.w3c.css.sac.Selector;
import org.w3c.dom.css.DocumentCSS;
import org.w3c.dom.stylesheets.StyleSheet;

Expand All @@ -26,21 +23,10 @@
*/
public interface ExtendedDocumentCSS extends DocumentCSS {

public static final Integer SAC_ID_CONDITION = Integer.valueOf(Condition.SAC_ID_CONDITION);
public static final Integer SAC_CLASS_CONDITION = Integer.valueOf(Condition.SAC_CLASS_CONDITION);
public static final Integer SAC_PSEUDO_CLASS_CONDITION = Integer.valueOf(Condition.SAC_PSEUDO_CLASS_CONDITION);
public static final Integer OTHER_SAC_CONDITIONAL_SELECTOR = Integer.valueOf(Selector.SAC_CONDITIONAL_SELECTOR);

public static final Integer OTHER_SAC_SELECTOR = Integer.valueOf(999);

public void addStyleSheet(StyleSheet styleSheet);

public void removeAllStyleSheets();

public List<?> queryConditionSelector(int conditionType);

public List<?> querySelector(int selectorType, int conditionType);

/**
* @since 0.12.200
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,23 @@ public default String retrieveCSSProperty(Object element, String property, Strin
return null;
}

/**
* Callback method called once after all CSS properties of a single
* declaration have been applied. Handlers that need to perform a final
* step (re-layout, redraw, batched commit, ...) override this method;
* the default is a no-op.
*/
default void onAllCSSPropertiesApplied(Object element, CSSEngine engine) throws Exception {
// do nothing
}

/**
* Variant of {@link #onAllCSSPropertiesApplied(Object, CSSEngine)} that
* also receives the pseudo class. Defaults to delegating to the
* pseudo-less form.
*/
default void onAllCSSPropertiesApplied(Object element, CSSEngine engine, String pseudo) throws Exception {
onAllCSSPropertiesApplied(element, engine);
}

}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
import org.eclipse.e4.ui.css.core.dom.IElementProvider;
import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler;
import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverter;
import org.eclipse.e4.ui.css.core.impl.engine.selector.Selectors;
import org.eclipse.e4.ui.css.core.resources.IResourcesRegistry;
import org.eclipse.e4.ui.css.core.util.resources.IResourcesLocatorManager;
import org.w3c.css.sac.InputSource;
import org.w3c.css.sac.Selector;
import org.w3c.css.sac.SelectorList;
import org.w3c.dom.Element;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSStyleSheet;
Expand Down Expand Up @@ -105,27 +104,27 @@ public interface CSSEngine {
/**
* Parse Selectors from String value.
*/
SelectorList parseSelectors(String text);
Selectors.SelectorList parseSelectors(String text);

/**
* Parse Selectors from InputSource value.
*/
SelectorList parseSelectors(InputSource source) throws IOException;
Selectors.SelectorList parseSelectors(InputSource source) throws IOException;

/**
* Parse Selectors from InputStream.
*/
SelectorList parseSelectors(InputStream stream) throws IOException;
Selectors.SelectorList parseSelectors(InputStream stream) throws IOException;

/**
* Parse Selectors from String value.
*/
SelectorList parseSelectors(Reader reader) throws IOException;
Selectors.SelectorList parseSelectors(Reader reader) throws IOException;

/**
* Check if the <code>selector</code> matches the object <code>node</code>.
*/
boolean matches(Selector selector, Object node, String pseudo);
boolean matches(Selectors.Selector selector, Object node, String pseudo);

/*--------------- Apply styles -----------------*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2015 Angelo Zerr and others.
* Copyright (c) 2008, 2026 Angelo Zerr and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -17,8 +17,7 @@

import org.eclipse.e4.ui.css.core.dom.CSSPropertyList;
import org.eclipse.e4.ui.css.core.dom.ExtendedCSSRule;
import org.w3c.css.sac.Selector;
import org.w3c.css.sac.SelectorList;
import org.eclipse.e4.ui.css.core.impl.engine.selector.Selectors;
import org.w3c.dom.DOMException;
import org.w3c.dom.css.CSSRule;
import org.w3c.dom.css.CSSStyleDeclaration;
Expand All @@ -27,10 +26,10 @@

public class CSSStyleRuleImpl extends CSSRuleImpl implements CSSStyleRule, ExtendedCSSRule {

private final SelectorList selectors;
private final Selectors.SelectorList selectors;
private CSSStyleDeclaration styleDeclaration;

public CSSStyleRuleImpl(CSSStyleSheet parentStyleSheet, CSSRule parentRule, SelectorList selectors) {
public CSSStyleRuleImpl(CSSStyleSheet parentStyleSheet, CSSRule parentRule, Selectors.SelectorList selectors) {
super(parentStyleSheet, parentRule);
this.selectors = selectors;
}
Expand All @@ -55,17 +54,7 @@ public String getCssText() {

@Override
public String getSelectorText() {
StringBuilder sb = new StringBuilder();
for (int selID = 0; selID < getSelectorList().getLength(); selID++) {
Selector item = getSelectorList().item(selID);
sb.append(item.toString());
sb.append(", ");
}
if (getSelectorList().getLength() > 0) {
sb.delete(sb.length() - 2, sb.length());
}

return sb.toString();
return selectors.text();
}

@Override
Expand All @@ -83,7 +72,7 @@ public void setSelectorText(String selectorText) throws DOMException {
// Additional methods

@Override
public SelectorList getSelectorList() {
public Selectors.SelectorList getSelectorList() {
return selectors;
}

Expand Down
Loading
Loading