private TextEditProcessor createTextEditProcessor(IDocument document, int flags, boolean preview) throws CoreException {
private TextEditProcessor createTextEditProcessor(IDocument document, int flags, boolean preview) {
	private TextEditProcessor createTextEditProcessor(IDocument document, int flags, boolean preview) throws CoreException {		if (fEdit == null)			return new TextEditProcessor(document, new MultiTextEdit(0,0), flags);		List excludes= new ArrayList(0);		for (Iterator iter= fTextEditChangeGroups.iterator(); iter.hasNext(); ) {			TextEditChangeGroup edit= (TextEditChangeGroup)iter.next();			if (!edit.isEnabled()) {				excludes.addAll(Arrays.asList(edit.getTextEditGroup().getTextEdits()));			}		}		if (preview) {			fCopier= new TextEditCopier(fEdit);			TextEdit copiedEdit= fCopier.perform();			if (fTrackEdits)				flags= flags | TextEdit.UPDATE_REGIONS;			LocalTextEditProcessor result= new LocalTextEditProcessor(document, copiedEdit, flags);			result.setExcludes(mapEdits(				(TextEdit[])excludes.toArray(new TextEdit[excludes.size()]),				fCopier));				if (!fTrackEdits)				fCopier= null;			return result;		} else {			LocalTextEditProcessor result= new LocalTextEditProcessor(document, fEdit, flags | TextEdit.UPDATE_REGIONS);			result.setExcludes((TextEdit[])excludes.toArray(new TextEdit[excludes.size()]));			return result;		}	}