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
if (c instanceof ContentAssistant)
					ContentAssistPreference.changeConfiguration((ContentAssistant) c, getPreferenceStore(), event);
			}
				
		} finally {
			super.handlePreferenceStoreChanged(event);
		}
	}
	/**
	 * Handles a property change event describing a change
	 * of the java core's preferences and updates the preference
	 * related editor properties.
	 * 
	 * @param event the property change event
	 */
	protected void handlePreferencePropertyChanged(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
		AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
		if (asv != null) {
			String p= event.getProperty();					
			if (CODE_FORMATTER_TAB_SIZE.equals(p) || CODE_FORMATTER_TAB_CHAR.equals(p)) {
			    SourceViewerConfiguration configuration= getSourceViewerConfiguration();
				String[] types= configuration.getConfiguredContentTypes(asv);					
				for (int i= 0; i < types.length; i++)
				    asv.setIndentPrefixes(configuration.getIndentPrefixes(asv, types[i]), types[i]);
				    
				if (fTabConverter != null)
					fTabConverter.setNumberOfSpacesPerTab(getTabSize());
			}
		}
	}