fix #774 infinite loop in net.sourceforge.phpeclipse.builder.IdentifierIndexManager...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / link / ILinkedPositionListener.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 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
12 package net.sourceforge.phpdt.internal.ui.text.link;
13
14 import org.eclipse.jface.text.Position;
15
16 /**
17  * A listener for highlight change notification and exititing linked mode.
18  */
19 public interface ILinkedPositionListener {
20
21         /**
22          * Notifies that the linked mode has been left. On success, all changes are
23          * kept, otherwise all changes made to the linked positions are restored to
24          * the state before entering linked mode.
25          */
26         void exit(int flags);
27
28         /**
29          * Notifies the changed linked position. The listener is asked to reposition
30          * the caret at the given offset.
31          * 
32          * @param position
33          *            the linked position which initiated the change.
34          * @param caretOffset
35          *            the caret offset relative to the position.
36          */
37         void setCurrentPosition(Position position, int caretOffset);
38
39 }