Bug 186370 [LinkedResources] Cannot create linked output folder pointing to path variable
Build: I20070508-0800 1) Create a new Java project 2) Create a path variable FOO pointing to some existing directory that has a sub-directory (I used c:\temp) 3) Right click on project > Properties > Java build path 4) Click the Browse button at the bottom to select a new output location 5) Select the project and click "Create New Folder" 6) Enter "bin2" as the name, and click "Advanced" 7) Select "Link to folder in the file system" 8) Click "Variables" 9) Select FOO, and click "Extend" 10) Select a sub-directory, and click "OK" -> You end up back in the new folder dialog, and there is a warning message saying "Link target does not exist". This is not incorrect. 11) Click "OK" several times to close all the dialogs. 12) Open the .project file, and notice that it has not used the path variable in the link. The location of the linked folder bin2 in my case was "D:/FOO/location".
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.ide.dialogs.PathVariableSelectionDialog;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.internal.ide.filesystem.FileSystemConfiguration;
import org.eclipse.ui.internal.ide.filesystem.FileSystemSupportRegistry;
/**
 * Widget group for specifying a linked file or folder target.
 * 
 * @since 2.1
 */
public class CreateLinkedResourceGroup {