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
private void stopLineHighlighting() {
		if (fLinePainter != null) {
			fPaintManager.removePainter(fLinePainter);
			fLinePainter.deactivate(true);
			fLinePainter.dispose();
			fLinePainter= null;
		}
	}
	
	private boolean isLineHighlightingEnabled() {
		IPreferenceStore store= getPreferenceStore();
		return store.getBoolean(CURRENT_LINE);
	}
	
	private void showPrintMargin() {
		if (fPrintMarginPainter == null) {
			fPrintMarginPainter= new PrintMarginPainter(getSourceViewer());
			fPrintMarginPainter.setMarginRulerColor(getColor(PRINT_MARGIN_COLOR));
			fPrintMarginPainter.setMarginRulerColumn(getPreferenceStore().getInt(PRINT_MARGIN_COLUMN));
			fPaintManager.addPainter(fPrintMarginPainter);
		}
	}
	
	private void hidePrintMargin() {
		if (fPrintMarginPainter != null) {
			fPaintManager.removePainter(fPrintMarginPainter);
			fPrintMarginPainter.deactivate(true);
			fPrintMarginPainter.dispose();
			fPrintMarginPainter= null;