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;
18 * Turns off occurrences highlighting on a java editor until linked mode is
23 public class EditorHighlightingSynchronizer implements ILinkedModeListener {
25 private final PHPEditor fEditor;
27 // private final boolean fWasOccurrencesOn;
30 * Creates a new synchronizer.
33 * the java editor the occurrences markers of which will be
34 * synchonized with the linked mode
37 public EditorHighlightingSynchronizer(PHPEditor editor) {
38 Assert.isLegal(editor != null);
40 // fWasOccurrencesOn= fEditor.isMarkingOccurrences();
42 // if (fWasOccurrencesOn)
43 // fEditor.uninstallOccurrencesFinder();
47 * @see org.eclipse.jface.text.link.ILinkedModeListener#left(org.eclipse.jface.text.link.LinkedModeModel,
50 public void left(LinkedModeModel environment, int flags) {
51 // if (fWasOccurrencesOn)
52 // fEditor.installOccurrencesFinder();
56 * @see org.eclipse.jface.text.link.ILinkedModeListener#suspend(org.eclipse.jface.text.link.LinkedModeModel)
58 public void suspend(LinkedModeModel environment) {
62 * @see org.eclipse.jface.text.link.ILinkedModeListener#resume(org.eclipse.jface.text.link.LinkedModeModel,
65 public void resume(LinkedModeModel environment, int flags) {