change.setKeepPreviewEdits(true);
	public void apply(IDocument document) {		try {			ICompilationUnit unit= JavaModelUtil.toOriginal(getCompilationUnit());			IStatus status= Resources.makeCommittable(unit.getResource(), null);			if (!status.isOK()) {				String label= CorrectionMessages.getString("CUCorrectionProposal.error.title"); //$NON-NLS-1$				String message= CorrectionMessages.getString("CUCorrectionProposal.error.message"); //$NON-NLS-1$				ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), label, message, status);				return;			}						CompilationUnitChange change= getCompilationUnitChange();						TextEditGroup selection= getSelectionDescription();			TextEditGroup[] linked= getLinkedRanges();						IEditorPart part= null;			if (selection != null || linked != null) {				change.setKeepPreviewEdits(true);								part= EditorUtility.isOpenInEditor(unit);				if (part == null) {					part= EditorUtility.openInEditor(unit, true);				}				IWorkbenchPage page= JavaPlugin.getActivePage();				if (page != null && part != null) {					page.bringToTop(part);				}				if (part != null) {					part.setFocus();				}			}						super.apply(document);			if (part == null) {				return;			}						if (linked != null && part instanceof JavaEditor) {				// enter linked mode				ITextViewer viewer= ((JavaEditor) part).getViewer();				enterLinkedMode(change, viewer, linked, selection);			} else if (selection != null && part instanceof ITextEditor) {				// select a result				IRegion range= TextEdit.getCoverage(change.getPreviewEdits(selection.getTextEdits()));				int pos= range.getOffset() + range.getLength();				((ITextEditor) part).selectAndReveal(pos, 0);			}		} catch (CoreException e) {			JavaPlugin.log(e);		} catch (BadLocationException e) {			JavaPlugin.log(e);		}			}