Bug 7252 Can add a variable with no associated jar file to a build path
It is possible to add a variable to the build path for a project using add variable but this will not pick up the classes in that directory. The user although warned can still select it. STEPS 1) Define a classpath variable PATH_TEST that is a directory with classes in it 2) Open the properties dialog on a JavaProject 3) Select the Libraries Tag 4) Select Add Variable 5) Select PATH_TEST 6) You will get a message that Resolved path does not exist. However OK is enabled so you can select this and believe it is valid.The UI correctly shows the empty circle to indicate it is not found but it is easy to miss the cause of this.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/MessageLine.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.dialogs;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
/**
 * A message line. It distinguishs between "normal" messages and errors. 
 * Setting an error message hides a currently displayed message until 
 * <code>clearErrorMessage</code> is called.
 */
public class MessageLine extends CLabel {
	public static final RGB RED= new RGB(200, 0, 0);
	private static RGB fgDefaultErrorRGB= RED;
	private String fMessageText;
	private String fErrorText;
	private Color fDefaultColor;
	private RGB fErrorRGB;
	private Color fErrorColor;
	/**
	 * Creates a new message line as a child of the given parent.
	 * Error message will be shown in <code>RED</code>.
	 */