Added PHPUnitEditor and corresponding PHPPreferencePage
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / link / LinkedPositionListener.java
1 /**********************************************************************
2 Copyright (c) 2000, 2002 IBM Corp. 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 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 LinkedPositionListener {
20         
21         /**
22          * Notifies that the linked mode has been left. On success, all changes
23          * are kept, otherwise all changes made to the linked positions are restored
24          * to the state before entering linked mode.
25          */
26         void exit(boolean success);
27         
28         /**
29          * Notifies the changed linked position. The listener is asked
30          * to reposition the caret at the given offset.
31          * 
32          * @param position    the linked position which initiated the change.
33          * @param caretOffset the caret offset relative to the position.
34          */
35         void setCurrentPosition(Position position, int caretOffset);
36
37 }