2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.ui.text.link;
7 import org.eclipse.jface.text.IDocumentExtension;
8 import org.eclipse.jface.text.Position;
11 * A listener for highlight change notification and exititing linked mode.
13 public interface LinkedPositionListener {
16 * Notifies that the linked mode has been left. On success, all changes
17 * are kept, otherwise all changes made to the linked positions are restored
18 * to the state before entering linked mode.
20 void exit(boolean success);
23 * Notifies the changed linked position. The listener is asked
24 * to reposition the caret at the given offset.
26 * @param position the linked position which initiated the change.
27 * @param caretOffset the caret offset relative to the position.
29 void setCurrentPosition(Position position, int caretOffset);