Bug 30344 Insertion of 'scrapbook' error messages unhelpful
When an error occurs in the scrapbook (e.g. a syntax error) or a result is returned, the scrapbook inserts text in the scrapbook page (which is what VAJ used to do). This has always been remarkably unhelpful; if the developer does not delete the message/result straight away then when selecting a block of text next time may end up with the error message being interpreted, which gives a further error message ad tedium. It would be much better if a pop-up-dialog box was used to indicate of a result/error that could be dismissed leaving the source code intact, or alternatively displaying the result using another mechanism (pop-up text, console for standard output/error etc.)
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceConverter.java
* All Rights Reserved.
 */
import java.util.Arrays;
import java.util.StringTokenizer;
import org.eclipse.jface.resource.*;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.Shell;
/**
 * A utility class for dealing with preferences whose values are
 * common SWT objects (color, points, rectangles, and font data).
 * The static methods on this class handle the conversion between
 * the SWT objects and their string representations.
 * <p>
 * Usage:
 * <pre>
 * IPreferenceStore store = ...;
 * PreferenceConverter.setValue(store, "bg", new RGB(127,127,127));
 * ...
 * RBG bgColor = PreferenceConverter.getValue(store, "bg");
 * </pre>
 * </p>
 * <p>
 * This class contains static methods and fields only and cannot 
 * be instantiated.
 * </p>
 */
public class PreferenceConverter {
	/**
	 * The default-default value for point preferences