Bug 278091 [CSS] Measure.getCssText() with float value results in IllegalStateException
In theory we should be able to provide percentages as part of the gradients, e.g. CTabFolder:selected { background-color: #FF0000 #0000FF 30% } But this generates IllegalStateException calling getCSSText() on org.apache.batik.css.parser.CSSLexicalUnit$FloatLexicalUnit from Measure.getCSSText().
tests/org.eclipse.e4.ui.tests.css.swt/src/org/eclipse/e4/ui/tests/css/swt/GradientTest.java
try {
			Field field = folder.getClass().getDeclaredField("selectionGradientColors");
			field.setAccessible(true);
			return ((Color[]) field.get(folder))[i];
		} catch (NoSuchFieldException e) {
			
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			
			e.printStackTrace();
		}
		return null;
	}
	int[] getSelectionGradientPercents(CTabFolder folder) {
		
		try {
			Field field = folder.getClass().getDeclaredField("selectionGradientPercents");
			field.setAccessible(true);
			return (int[]) field.get(folder);
		} catch (NoSuchFieldException e) {
			
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			
			e.printStackTrace();
		}
		return null;
	}
}