X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLReconcilingStrategy.java b/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLReconcilingStrategy.java index 9ee1eba..47a7798 100644 --- a/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLReconcilingStrategy.java +++ b/net.sourceforge.phpeclipse.xml.ui/src/net/sourceforge/phpeclipse/xml/ui/internal/text/XMLReconcilingStrategy.java @@ -8,11 +8,10 @@ * Contributors: * Christopher Lenz - initial API and implementation * - * $Id: XMLReconcilingStrategy.java,v 1.2 2005-05-06 00:55:41 stefanbjarni Exp $ + * $Id: XMLReconcilingStrategy.java,v 1.3 2006-10-21 23:14:13 pombredanne Exp $ */ package net.sourceforge.phpeclipse.xml.ui.internal.text; - import java.lang.reflect.InvocationTargetException; import java.util.Iterator; @@ -38,8 +37,8 @@ import org.eclipse.ui.texteditor.ITextEditor; * Reconciling strategy for XML document. This class is responsible for keeping * the parsed model in sync with the text. */ -public class XMLReconcilingStrategy - implements IReconcilingStrategy, IReconcilingStrategyExtension { +public class XMLReconcilingStrategy implements IReconcilingStrategy, + IReconcilingStrategyExtension { // Instance Variables ------------------------------------------------------ @@ -88,7 +87,7 @@ public class XMLReconcilingStrategy */ public void setDocument(IDocument document) { // FIXME - firstStep.setInputModel(null); //new DocumentAdapter(document); + firstStep.setInputModel(null); // new DocumentAdapter(document); } // IReconcilingStrategyExtension Implementation ---------------------------- @@ -115,7 +114,7 @@ public class XMLReconcilingStrategy * * @return the annotation model */ - IAnnotationModel getAnnotationModel() { + IAnnotationModel getAnnotationModel() { IEditorInput input = editor.getEditorInput(); return editor.getDocumentProvider().getAnnotationModel(input); } @@ -130,10 +129,9 @@ public class XMLReconcilingStrategy IRunnableWithProgress runnable = new WorkspaceModifyOperation() { protected void execute(IProgressMonitor monitor) { - for (int i = 0; i < results.length; i++) { - if ((progressMonitor != null) && - (progressMonitor.isCanceled())) - { + for (int i = 0; i < results.length; i++) { + if ((progressMonitor != null) + && (progressMonitor.isCanceled())) { return; } @@ -162,11 +160,11 @@ public class XMLReconcilingStrategy /* * TODO A "real" implementation must be smarter, i.e. don't remove and add - * the annotations which are the same. - */ + * the annotations which are the same. + */ private void removeTemporaryAnnotations() { Iterator i = getAnnotationModel().getAnnotationIterator(); - while (i.hasNext()) { + while (i.hasNext()) { Annotation annotation = (Annotation) i.next(); if (!annotation.isPersistent()) { getAnnotationModel().removeAnnotation(annotation);