*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / link / LinkedPositionListener.java
1 /*
2  * (c) Copyright IBM Corp. 2000, 2001.
3  * All Rights Reserved.
4  */
5 package net.sourceforge.phpdt.internal.ui.text.link;
6
7 import org.eclipse.jface.text.Position;
8
9 /**
10  * A listener for highlight change notification and exititing linked mode.
11  */
12 public interface LinkedPositionListener {
13         
14         /**
15          * Notifies that the linked mode has been left. On success, all changes
16          * are kept, otherwise all changes made to the linked positions are restored
17          * to the state before entering linked mode.
18          */
19         void exit(boolean success);
20         
21         /**
22          * Notifies the changed linked position. The listener is asked
23          * to reposition the caret at the given offset.
24          * 
25          * @param position    the linked position which initiated the change.
26          * @param caretOffset the caret offset relative to the position.
27          */
28         void setCurrentPosition(Position position, int caretOffset);
29
30 }