* 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;
* 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 ------------------------------------------------------
*/
public void setDocument(IDocument document) {
// FIXME
- firstStep.setInputModel(null); //new DocumentAdapter(document);
+ firstStep.setInputModel(null); // new DocumentAdapter(document);
}
// IReconcilingStrategyExtension Implementation ----------------------------
*
* @return the annotation model
*/
- IAnnotationModel getAnnotationModel() {
+ IAnnotationModel getAnnotationModel() {
IEditorInput input = editor.getEditorInput();
return editor.getDocumentProvider().getAnnotationModel(input);
}
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;
}
/*
* 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);