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 are
23 * kept, otherwise all changes made to the linked positions are restored to
24 * the state before entering linked mode.
26 void exit(boolean success);
29 * Notifies the changed linked position. The listener is asked to reposition
30 * the caret at the given offset.
33 * the linked position which initiated the change.
35 * the caret offset relative to the position.
37 void setCurrentPosition(Position position, int caretOffset);