Bug 56484 [Fonts/Colors] Theme API cannot rely on JFaceResources.
I've been poking around and it seems like the theme code would be much better off living in JFace. We currently have a lot of JFace code that directly accesses JFaceResources.blah() and thereby bypasses the theme logic entirely. Certain dialogs wont respond to theme changes because of this. However, if we moved the bulk of the theme API into JFace we'd be able to make use of it there as well. We could remove all of our internal references to JFaceResources. Additionally, we could hook JfaceResources into themes itself...have getColor/FontRegistyr return the registry associated with the current theme. By doing this everyone who makes use of JFaceResources wouldn't have to change any code to make use of themes. The big drawback to this is that anyone who's currently using themes (ie: importing from the org.eclipse.ui.themes package) would be broken. There aren't too many people that are doing this (if any, besides us) so we can probably do this with the minimum of fuss. Comments? If we're going to do this we should do it ASAP. The further into M9 we get the more likely it is that themes will have itself clients.
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/StringConverter.java
/**
	 * Converts the given value into a double.
	 * Returns the given default value if the 
	 * value does not represent a double.
	 *
	 * @param value the value to be converted
	 * @param dflt the default value
	 * @return the value as a double, or the default value
	 */
	public static double asDouble(String value, double dflt) {
		try {
			return asDouble(value);
		} catch (DataFormatException e) {
			return dflt;
		}
	}
	/**
	 * Converts the given value into a float.
	 * This method fails if the value does not represent a float.
	 *
	 * @param value the value to be converted
	 * @return the value as a float
	 * @exception DataFormatException if the given value does not represent
	 *	a float
	 */
	public static float asFloat(String value) throws DataFormatException {
		try {
			return (Float.valueOf(value)).floatValue();
		} catch (NumberFormatException e) {
			throw new DataFormatException(e.getMessage());