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
super.createActions();
		Action action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "CorrectionAssistProposal.", this, JavaCorrectionSourceViewer.CORRECTIONASSIST_PROPOSALS); 
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CORRECTION_ASSIST_PROPOSALS);		
		setAction("CorrectionAssistProposal", action); 
		action= new ContentAssistAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); 
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);		
		setAction("ContentAssistProposal", action); 
		action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);	
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);		
		setAction("ContentAssistContextInformation", action); 
		action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Comment.", this, ITextOperationTarget.PREFIX); 
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.COMMENT);		
		setAction("Comment", action); 
		action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX); 
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.UNCOMMENT);		
		setAction("Uncomment", action); 
		action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT); 
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.FORMAT);		
		setAction("Format", action); 
		markAsStateDependentAction("CorrectionAssistProposal", true); 
		markAsStateDependentAction("ContentAssistProposal", true); 
		markAsStateDependentAction("ContentAssistContextInformation", true); 
		markAsStateDependentAction("Comment", true); 
		markAsStateDependentAction("Uncomment", true); 
		markAsStateDependentAction("Format", true); 
		
		fSelectionHistory= new SelectionHistory(this);
		action= new StructureSelectEnclosingAction(this, fSelectionHistory);
		action.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_ENCLOSING);				
		setAction(StructureSelectionAction.ENCLOSING, action);