Bug 23348 Quickfix ignores read-only state [quick fix]
Build: 20020903 1. Create a new Java project. 2. Create a new Java file, A.java public class A { public void foo() { ba(); } public void bar() { } } 3. Save the file. 4. Mark it read-only. 5. Right click the error in the task list and select "Quick- fix..." 6. Select either of the options, the edits are made (in a read-only file!).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMarkerResolutionGenerator.java
fProposal= proposal;
		}
	
		/* (non-Javadoc)
		 * @see IMarkerResolution#getLabel()
		 */
		public String getLabel() {
			return fProposal.getDisplayString();
		}
	
		/* (non-Javadoc)
		 * @see IMarkerResolution#run(IMarker)
		 */
		public void run(IMarker marker) {
			IDocument doc= JavaPlugin.getDefault().getCompilationUnitDocumentProvider().getDocument(fEditorInput);
			if (doc != null) {
				fProposal.apply(doc);
			}
		}
	
	}
	/**
	 * Constructor for CorrectionMarkerResolutionGenerator.
	 */
	public CorrectionMarkerResolutionGenerator() {
		super();
	}
	/* (non-Javadoc)
	 * @see IMarkerResolutionGenerator#getResolutions(IMarker)
	 */