Bug 138190 [Wizards] Save As doesn't check validity of location
Build id: N20060424-0010 1) Create project "P1" containing file "a.txt" 2) Open the editor on a.txt 3) File > Save As 4) In the "File name" field, enter "c:\temp\a.txt" (I was somehow thinking I could save the file in the file system from here). 5) Click Ok. It creates a file /P1/temp/a.txt I would have expected an error in the wizard as soon as I entered the ":" character, which is not a valid character in file names on windows.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java
} else {
                
                IDEWorkbenchPlugin.log(getClass(),
                        "createNewFile()", e.getTargetException()); 
                MessageDialog
                        .openError(
                                getContainer().getShell(),
                                IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle, NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage, e.getTargetException().getMessage()));
            }
            return null;
        }
        newFile = newFileHandle;
        return newFile;
    }
    /**
     * Returns the scheduling rule to use when creating the resource at
     * the given container path. The rule should be the creation rule for
     * the top-most non-existing parent.
     * @param resource The resource being created
     * @return The scheduling rule for creating the given resource
     * @since 3.1
     */
    protected ISchedulingRule createRule(IResource resource) {
		IResource parent = resource.getParent();
    	while (parent != null) {
    		if (parent.exists()) {
				return resource.getWorkspace().getRuleFactory().createRule(resource);
			}
    		resource = parent;
    		parent = parent.getParent();