type.getCompilationUnit().reconcile();
synchronized (type.getCompilationUnit()) { type.getCompilationUnit().reconcile(); }
	private void showUI(IType type, IField[] preselected) {		try {			AddDelegateMethodsContentProvider provider = new AddDelegateMethodsContentProvider(type);			Methods2FieldLabelProvider methodLabel = new Methods2FieldLabelProvider();			SourceActionDialog dialog = new SourceActionDialog(getShell(), methodLabel, provider, fEditor, type);						dialog.setValidator(createValidator(provider.getNumEntries()));			Methods2FieldSorter sorter= new Methods2FieldSorter();			dialog.setSorter(sorter);			dialog.setInput(new Object());						dialog.setContainerMode(true);			dialog.setMessage(ActionMessages.getString("AddDelegateMethodsAction.message")); //$NON-NLS-1$			dialog.setTitle(ActionMessages.getString("AddDelegateMethodsAction.title")); //$NON-NLS-1$						Object[] elements= provider.getElements(null);						sorter.sort(null, elements);			Object[] expand= {elements[0]};			dialog.setExpandedElements(expand);			dialog.setInitialSelections(preselected);			dialog.setSize(60, 18);			int result = dialog.open();			if (result == Window.OK) {				Object[] o = dialog.getResult();				if (o == null)					return;				ArrayList methods = new ArrayList(o.length);				for (int i = 0; i < o.length; i++) {					if (o[i] instanceof Methods2Field)						methods.add(o[i]);				}				IEditorPart part = EditorUtility.openInEditor(type);				type = (IType) JavaModelUtil.toWorkingCopy(type);												IRewriteTarget target= (IRewriteTarget) part.getAdapter(IRewriteTarget.class);				IMethod[] createdMethods= null;				try {					if (target != null) {						target.beginCompoundChange();					}					// pass dialog based information to the operation 					IJavaElement elementPosition= dialog.getElementPosition();										CodeGenerationSettings settings = JavaPreferencesSettings.getCodeGenerationSettings();					settings.createComments= dialog.getGenerateComment();															createdMethods= processResults(methods, type, elementPosition, settings);				} finally {					if (target != null) {						target.endCompoundChange();					}				}								if (createdMethods != null && createdMethods.length > 0) {					type.getCompilationUnit().reconcile();					EditorUtility.revealInEditor(part, createdMethods[0]);				}			}		} catch (CoreException e) {			ExceptionHandler.handle(e, DIALOG_TITLE, ActionMessages.getString("AddDelegateMethodsAction.error.actionfailed")); //$NON-NLS-1$		} catch (InvocationTargetException e) {			ExceptionHandler.handle(e, DIALOG_TITLE, ActionMessages.getString("AddDelegateMethodsAction.error.actionfailed")); //$NON-NLS-1$		}	}