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;
 
  13 import org.eclipse.jface.text.Assert;
 
  14 import org.eclipse.jface.text.link.ILinkedModeListener;
 
  15 import org.eclipse.jface.text.link.LinkedModeModel;
 
  19  * Turns off occurrences highlighting on a java editor until linked mode is
 
  24 public class EditorHighlightingSynchronizer implements ILinkedModeListener {
 
  26         private final PHPEditor fEditor;
 
  27 //      private final boolean fWasOccurrencesOn;
 
  30          * Creates a new synchronizer.
 
  32          * @param editor the java editor the occurrences markers of which will be 
 
  33          *        synchonized with the linked mode
 
  36         public EditorHighlightingSynchronizer(PHPEditor editor) {
 
  37                 Assert.isLegal(editor != null);
 
  39 //              fWasOccurrencesOn= fEditor.isMarkingOccurrences();
 
  41 //              if (fWasOccurrencesOn)
 
  42 //                      fEditor.uninstallOccurrencesFinder();
 
  46          * @see org.eclipse.jface.text.link.ILinkedModeListener#left(org.eclipse.jface.text.link.LinkedModeModel, int)
 
  48         public void left(LinkedModeModel environment, int flags) {
 
  49 //              if (fWasOccurrencesOn)
 
  50 //                      fEditor.installOccurrencesFinder();
 
  54          * @see org.eclipse.jface.text.link.ILinkedModeListener#suspend(org.eclipse.jface.text.link.LinkedModeModel)
 
  56         public void suspend(LinkedModeModel environment) {
 
  60          * @see org.eclipse.jface.text.link.ILinkedModeListener#resume(org.eclipse.jface.text.link.LinkedModeModel, int)
 
  62         public void resume(LinkedModeModel environment, int flags) {