Merged "Open PHP Declaration" and "Open Include File" into one action "Open Declarati...
[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 /**
19  * Turns off occurrences highlighting on a java editor until linked mode is
20  * left.
21  * 
22  * @since 3.0
23  */
24 public class EditorHighlightingSynchronizer implements ILinkedModeListener {
25         
26         private final PHPEditor fEditor;
27 //      private final boolean fWasOccurrencesOn;
28         
29         /**
30          * Creates a new synchronizer.
31          * 
32          * @param editor the java editor the occurrences markers of which will be 
33          *        synchonized with the linked mode
34          * 
35          */
36         public EditorHighlightingSynchronizer(PHPEditor editor) {
37                 Assert.isLegal(editor != null);
38                 fEditor= editor;
39 //              fWasOccurrencesOn= fEditor.isMarkingOccurrences();
40 //              
41 //              if (fWasOccurrencesOn)
42 //                      fEditor.uninstallOccurrencesFinder();
43         }
44
45         /*
46          * @see org.eclipse.jface.text.link.ILinkedModeListener#left(org.eclipse.jface.text.link.LinkedModeModel, int)
47          */
48         public void left(LinkedModeModel environment, int flags) {
49 //              if (fWasOccurrencesOn)
50 //                      fEditor.installOccurrencesFinder();
51         }
52
53         /*
54          * @see org.eclipse.jface.text.link.ILinkedModeListener#suspend(org.eclipse.jface.text.link.LinkedModeModel)
55          */
56         public void suspend(LinkedModeModel environment) {
57         }
58
59         /*
60          * @see org.eclipse.jface.text.link.ILinkedModeListener#resume(org.eclipse.jface.text.link.LinkedModeModel, int)
61          */
62         public void resume(LinkedModeModel environment, int flags) {
63         }
64
65 }