Bug 266970 [CSS] Widget.setData keys should be qualified
There are many cases where we use Widget.setData(keyString, value) to remember some CSS value. See SWTElement for many examples. These key strings are often of the form "active", "hover", etc. They should be fully qualified to reduce conflicts since others may be using the widget's setData. So should instead be: "active" -> "org.eclipse.e4.ui.css.swt.active" "hover" -> "org.eclipse.e4.ui.css.swt.hover" Also, we should have final static fields to hold keys with these as values, eg. in DynamicPseudoClassesSWTActiveHandler we would have final static String WIDGET_ACTIVE_KEY = "org.eclipse.e4.ui.css.swt.activeLost"
bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/CSSSWTConstants.java
/**
	 * Key value for setting and getting the CSS class name of  a widget.
	 * Clients may rely on the value of this key if they want to avoid a dependency on this package.
	 * @see Widget.getData(String) Widget.setData(String, Object)
	 */
	public static final String CSS_CLASS_NAME_KEY = "org.eclipse.e4.ui.css.CssClassName";
	/**
	 * Key value for setting and getting the CSS ID of a widget.
	 * Clients may rely on the value of this key if they want to avoid a dependency on this package.
	 * @see Widget.getData(String) Widget.setData(String, Object)
	 */
	public static final String CSS_ID_KEY = "org.eclipse.e4.ui.css.id";
	
	/**
	 * Constant used to store {@link CSSBorderProperties} instance into SWT
	 * control data.
	 */
	public static final String CONTROL_CSS2BORDER_KEY = "org.eclipse.e4.ui.core.css.swt.CONTROL_CSS2BORDER_KEY";
	/**
	 * Constant used to store {@link CSS2FontProperties} instance into SWT
	 * control data.
	 */
	
	
	/**
	 * Constant used to store String Text into SWT control data.
	 */
	public static final String TEXT_KEY = "org.eclipse.e4.ui.core.css.swt.TEXT_KEY";
}