1 11 12 package org.eclipse.ant.internal.ui.editor.text; 13 14 import org.eclipse.ant.internal.ui.AntUIPlugin; 15 import org.eclipse.ant.internal.ui.editor.AntEditor; 16 import org.eclipse.ant.internal.ui.model.AntModel; 17 import org.eclipse.ant.internal.ui.model.IAntModel; 18 import org.eclipse.core.runtime.IProgressMonitor; 19 import org.eclipse.jface.text.IDocument; 20 import org.eclipse.jface.text.IRegion; 21 import org.eclipse.jface.text.reconciler.DirtyRegion; 22 import org.eclipse.jface.text.reconciler.IReconcilingStrategy; 23 import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension; 24 25 public class XMLReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension { 26 27 31 public static final int DELAY= 500; 32 33 private AntEditor fEditor; 34 35 public XMLReconcilingStrategy(AntEditor editor) { 36 fEditor= editor; 37 } 38 39 private void internalReconcile() { 40 try { 41 IAntModel model= fEditor.getAntModel(); 42 if (model instanceof AntModel) { 43 ((AntModel)model).reconcile(); 44 } 45 } catch (Exception e) { 46 AntUIPlugin.log(e); 47 } 48 } 49 50 55 public void reconcile(IRegion partition) { 56 internalReconcile(); 57 } 58 59 65 public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { 66 internalReconcile(); 67 } 68 69 74 public void setDocument(IDocument document) { 75 } 76 77 82 public void setProgressMonitor(IProgressMonitor monitor) { 83 } 84 85 90 public void initialReconcile() { 91 internalReconcile(); 92 } 93 } 94 | Popular Tags |