Added empty, foreach and isset keyword.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / EditorHighlightingSynchronizer.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpeclipse.phpeditor;
12
13 import org.eclipse.jface.text.Assert;
14 import org.eclipse.jface.text.link.ILinkedModeListener;
15 import org.eclipse.jface.text.link.LinkedModeModel;
16
17 /**
18  * Turns off occurrences highlighting on a java editor until linked mode is
19  * left.
20  * 
21  * @since 3.0
22  */
23 public class EditorHighlightingSynchronizer implements ILinkedModeListener {
24
25         private final PHPEditor fEditor;
26
27         // private final boolean fWasOccurrencesOn;
28
29         /**
30          * Creates a new synchronizer.
31          * 
32          * @param editor
33          *            the java editor the occurrences markers of which will be
34          *            synchonized with the linked mode
35          * 
36          */
37         public EditorHighlightingSynchronizer(PHPEditor editor) {
38                 Assert.isLegal(editor != null);
39                 fEditor = editor;
40                 // fWasOccurrencesOn= fEditor.isMarkingOccurrences();
41                 //              
42                 // if (fWasOccurrencesOn)
43                 // fEditor.uninstallOccurrencesFinder();
44         }
45
46         /*
47          * @see org.eclipse.jface.text.link.ILinkedModeListener#left(org.eclipse.jface.text.link.LinkedModeModel,
48          *      int)
49          */
50         public void left(LinkedModeModel environment, int flags) {
51                 // if (fWasOccurrencesOn)
52                 // fEditor.installOccurrencesFinder();
53         }
54
55         /*
56          * @see org.eclipse.jface.text.link.ILinkedModeListener#suspend(org.eclipse.jface.text.link.LinkedModeModel)
57          */
58         public void suspend(LinkedModeModel environment) {
59         }
60
61         /*
62          * @see org.eclipse.jface.text.link.ILinkedModeListener#resume(org.eclipse.jface.text.link.LinkedModeModel,
63          *      int)
64          */
65         public void resume(LinkedModeModel environment, int flags) {
66         }
67
68 }