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
* Will be removed if #9351 is solved.
		 */
		if (original != null && original.equals(file) && original.exists()) {
			doSave(progressMonitor);
			return;
		}
		
		
		final FileEditorInput newInput= new FileEditorInput(file);
		final boolean originalExists= original.exists();
		
		WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
			public void execute(final IProgressMonitor monitor) throws CoreException {
				
				if (fragment != null && originalExists) {
						
					
					IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
					ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
					
					/*
					 * 1GJXY0L: ITPJUI:WINNT - NPE during save As in Java editor
					 * Introduced null check, just go on in the null case
					 */
					if (unit != null) {
						/* 
						 * 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
						 * Changed false to true.
						 */
						unit.copy(fragment, null, fileName, true, monitor);