1 11 package org.eclipse.ant.internal.ui.editor; 12 13 import org.eclipse.core.runtime.Assert; 14 import org.eclipse.jface.text.link.ILinkedModeListener; 15 import org.eclipse.jface.text.link.LinkedModeModel; 16 17 22 public class EditorSynchronizer implements ILinkedModeListener { 23 24 private final AntEditor fEditor; 25 private final boolean fWasOccurrencesOn; 26 27 33 public EditorSynchronizer(AntEditor editor) { 34 Assert.isLegal(editor != null); 35 fEditor= editor; 36 fWasOccurrencesOn= fEditor.isMarkingOccurrences(); 37 fEditor.setInLinkedMode(true, fWasOccurrencesOn); 38 } 39 40 43 public void left(LinkedModeModel environment, int flags) { 44 fEditor.setInLinkedMode(false, fWasOccurrencesOn); 45 } 46 47 50 public void suspend(LinkedModeModel environment) { 51 } 52 53 56 public void resume(LinkedModeModel environment, int flags) { 57 } 58 } | Popular Tags |