Bug 164695 [Workbench] Project copy doesn't validate location and uses invalid location as default
Build: I2006114 1) Create a new project whose location is outside the workspace (say c:\temp\p1). 2) Select the project in the Navigator, and Hit Ctrl+C, Ctrl+V. 3) The project copy dialog opens. Accept the default and hit Ok. -> An error occurs because the location overlaps the location of the project being copied. There are two problems here: a) If the project is not in the default location, it should populate the dialog with a new location that is different from the original location (such as c:\temp\Copy of P1). I.e., it should provide reasonable defaults that don't cause the copy to fail. b) The location provided in the dialog should be validated using IWorkspace#validateProjectLocation. The Ok button should be greyed out until a valid location is supplied.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ProjectLocationSelectionDialog.java
* (non-Javadoc) Method declared in Window.
	 */
	protected void configureShell(Shell shell) {
		super.configureShell(shell);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
				IIDEHelpContextIds.PROJECT_LOCATION_SELECTION_DIALOG);
	}
	/*
	 * (non-Javadoc) Method declared on Dialog.
	 */
	protected Control createDialogArea(Composite parent) {
		
		Composite composite = (Composite) super.createDialogArea(parent);
		composite.setLayout(new GridLayout());
		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
		createProjectNameGroup(composite);
		locationArea = new ProjectContentsLocationArea(getErrorReporter(),
				composite, project);
		locationArea.updateProjectName(projectNameField.getText());
		return composite;
	}
	/**
	 * Create the listener that is used to validate the entries for the receiver
	 */
	private void createNameListener() {
		Listener listener = new Listener() {
			public void handleEvent(Event event) {
				setLocationForSelection();
				applyValidationResult(checkValid());
			}