Bug 125138 [LinkedResources] cannot extend variable
Using I20060118-0800 Using the contextual menu upon a project that has at least one linked source folder: - Build Path/Configure Build Path; - Source tab; - select a linked source folder, Edit; - Variables; - define CURRENT_WORKSPACE pointing to the current workspace root: - New; - Name: CURRENT_WORKSPACE; - Folder...: select the workspace root, then OK; - OK; - Extend: gets a 'No entries available'. I may miss a point here, but I believe this not correct. I would expect to be able to select a subdirectory of my current workspace. Pointing the variable to a Java project root doesn't seem to help.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java
IPath resultPath = new Path(variable.name);
        extensionPath = extensionPath.removeFirstSegments(matchCount);
        resultPath = resultPath.append(extensionPath);
        setSelectionResult(new String[] { resultPath.toOSString() });
    }
    /**
     * Updates the enabled state of the Extend button based on the 
     * current variable selection.
     */
    private void updateExtendButtonState() {
        PathVariablesGroup.PathVariableElement[] selection = pathVariablesGroup
                .getSelection();
        Button extendButton = getButton(EXTEND_ID);
        if (extendButton == null) {
			return;
		}
        if (selection.length == 1) {
            IFileInfo info = IDEResourceInfoUtils.getFileInfo(selection[0].path);
            if (info.exists() && info.isDirectory()) {
				extendButton.setEnabled(true);
			} else {
				extendButton.setEnabled(false);
			}
                
        } else {
			extendButton.setEnabled(false);
		}
    }
}