1 /*******************************************************************************
 
   2  * Copyright (c) 2000, 2004 IBM Corporation and others.
 
   3  * All rights reserved. This program and the accompanying materials 
 
   4  * are made available under the terms of the Common Public License v1.0
 
   5  * which accompanies this distribution, and is available at
 
   6  * http://www.eclipse.org/legal/cpl-v10.html
 
   9  *     IBM Corporation - initial API and implementation
 
  10  *******************************************************************************/
 
  11 package net.sourceforge.phpeclipse.phpeditor;
 
  14 //import org.eclipse.jface.text.Assert;
 
  15 import org.eclipse.core.runtime.Assert;
 
  16 import org.eclipse.jface.text.link.ILinkedModeListener;
 
  17 import org.eclipse.jface.text.link.LinkedModeModel;
 
  20  * Turns off occurrences highlighting on a java editor until linked mode is
 
  25 public class EditorHighlightingSynchronizer implements ILinkedModeListener {
 
  27         //private final PHPEditor fEditor;
 
  29         // private final boolean fWasOccurrencesOn;
 
  32          * Creates a new synchronizer.
 
  35          *            the java editor the occurrences markers of which will be
 
  36          *            synchonized with the linked mode
 
  39         public EditorHighlightingSynchronizer(PHPEditor editor) {
 
  40                 Assert.isLegal(editor != null);
 
  42                 // fWasOccurrencesOn= fEditor.isMarkingOccurrences();
 
  44                 // if (fWasOccurrencesOn)
 
  45                 // fEditor.uninstallOccurrencesFinder();
 
  49          * @see org.eclipse.jface.text.link.ILinkedModeListener#left(org.eclipse.jface.text.link.LinkedModeModel,
 
  52         public void left(LinkedModeModel environment, int flags) {
 
  53                 // if (fWasOccurrencesOn)
 
  54                 // fEditor.installOccurrencesFinder();
 
  58          * @see org.eclipse.jface.text.link.ILinkedModeListener#suspend(org.eclipse.jface.text.link.LinkedModeModel)
 
  60         public void suspend(LinkedModeModel environment) {
 
  64          * @see org.eclipse.jface.text.link.ILinkedModeListener#resume(org.eclipse.jface.text.link.LinkedModeModel,
 
  67         public void resume(LinkedModeModel environment, int flags) {