Bug 6295 File "save as" bug, new file is read-only
Environment: 0.137 driver on Windows NT 4.0 SP6a 1. Create a Java project and package 2. Create a Java class called "Test" in the project/package created in '1.' above. 3. Edit the "Test" class by adding a comment. 4. Select the "Test" class, the 'File' menu, 'Save Test.java As...', and save as a different file name. You will receive an error dialog that states: "Save Problems x Could not save file Reason: File is read-only" The file will be created but it will be 'read-only' and not read-write.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
return;
		}
			
		IPath filePath= dialog.getResult();
		if (filePath == null) {
			if (progressMonitor != null)
				progressMonitor.setCanceled(true);
			return;
		}
			
		filePath= filePath.removeTrailingSeparator();
		final String fileName= filePath.lastSegment();
		IPath folderPath= filePath.removeLastSegments(1);
		if (folderPath == null) {
			if (progressMonitor != null)
				progressMonitor.setCanceled(true);			
			return;
		}
		
		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
		
		/*
		 * 1GF7WG9: ITPJUI:ALL - EXCEPTION: "Save As..." always fails
		 */
		final IPackageFragment fragment= getPackage(root, folderPath);
		IFile file= root.getFile(filePath);
		
		/*
		 * Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=8873
		 * Problem caused by http://dev.eclipse.org/bugs/show_bug.cgi?id=9351