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
9 IBM Corporation - Initial implementation
10 **********************************************************************/
12 package net.sourceforge.phpdt.internal.ui.text.link;
14 import org.eclipse.jface.text.Position;
17 * A listener for highlight change notification and exititing linked mode.
19 public interface LinkedPositionListener {
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.
26 void exit(boolean success);
29 * Notifies the changed linked position. The listener is asked
30 * to reposition the caret at the given offset.
32 * @param position the linked position which initiated the change.
33 * @param caretOffset the caret offset relative to the position.
35 void setCurrentPosition(Position position, int caretOffset);