Bug 261018 [CSS] NPE in CSSComputedStyleImpl
Both Kai and I have been seeing the following exception. I think its related to comman separated values in the selector and may be specifically related to use of ID in the selector. Requires further investigation. The traces have at the top: java.lang.NullPointerException at org.eclipse.e4.ui.css.core.impl.dom.CSSComputedStyleImpl.<init>(CSSComputedStyleImpl.java:61) at org.eclipse.e4.ui.css.core.impl.dom.ViewCSSImpl.getComputedStyle(ViewCSSImpl.java:120) at org.eclipse.e4.ui.css.core.impl.dom.ViewCSSImpl.getComputedStyle(ViewCSSImpl.java:63) Kai's stylesheet, used in the ui.examples.css.editor.CSSEditorSWTWidgets, is: Shell, Button, Label { background-color: background-color: gradient, rgb(140,140,140), rgb(48,48,48), 100%; color: rgb(240,240,240); } SashForm { background-color: rgb(48,48,48); } Composite Label { background-color: rgb(48,48,48); } Composite Composite { background-color: rgb(48,48,48); } Text Composite { background-color: rgb(48,48,48); } DetailComposite { background-color: rgb(48,48,48); } Composite Text { background-color: rgb(100,100,100); color: white; } Composite { background-color: rgb(48,48,48); } Label { color: rgb(240,240,240); } Composite OrangeLabel { color: green; } Table, Text#output { background-color: gradient, rgb(48,48,48), rgb(140,140,140), 100%; color: rgb(240,240,240); } ToolBar { background-color: gradient, rgb(140,140,140), rgb(48,48,48), 100%; color: white; } CTabFolder:selected { background-color: black; font-weight: bold; } CTabFolder { color: rgb(150,150,150); background-color: rgb(48,48,48); }
bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/dom/CSSStyleDeclarationImpl.java
}
	/*
	 * (non-Javadoc)
	 * @see org.w3c.dom.css.CSSStyleDeclaration#item(int)
	 */
	public String item(int index) {
		return properties.get(index).getName();
	}
	/*
	 * (non-Javadoc)
	 * @see org.w3c.dom.css.CSSStyleDeclaration#removeProperty(String)
	 */
	public String removeProperty(String propertyName) throws DOMException {
		if(readOnly)
			throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR, DOMExceptionImpl.NO_MODIFICATION_ALLOWED_ERROR);
		for (int i = 0; i < properties.size(); i++) {
			CSSProperty property = properties.get(i);
			if(CSSPropertyImpl.sameName(property, propertyName)) {
				properties.remove(i);
				return property.getValue().toString();
			}
		}
		return "";
	}
	/*
	 * (non-Javadoc)
	 * @see org.w3c.dom.css.CSSStyleDeclaration#setCssText(String)
	 */
	public void setCssText(String cssText) throws DOMException {
		if(readOnly)