Bug 25370 Linked Mode: Want to define where to focus
20021022 I added a new feature that starts the linked mode on all usages of a variable. e.g. int i; i= 1; i++; would link all 3 occurrences of i, so when edited, all 3 references are changed simultanously. Problem is that the liked mode does not allow me to set the focus (where to edit) to e.g. the 'i' in 'i++'. The linked mode only allows to edit the top most linked position ('int i'). The feature can be invoked on any reference. Jumping to the top not so ideal.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
public int flags;	
		public boolean doit;
		public ExitFlags(int flags, boolean doit) {
			this.flags= flags;
			this.doit= doit;
		}						
	}
	
	public interface ExitPolicy {
		ExitFlags doExit(LinkedPositionManager manager, VerifyEvent event, int offset, int length);
	}
	
	
	private static final int UNINSTALL= 1;			
	public static final int COMMIT= 2;				
	private static final int DOCUMENT_CHANGED= 4;	
	public static final int UPDATE_CARET= 8;		
	private static final String CARET_POSITION= "LinkedPositionUI.caret.position"; 
	private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
	private static final IPreferenceStore fgStore= JavaPlugin.getDefault().getPreferenceStore();
	
	private final ITextViewer fViewer;
	private final LinkedPositionManager fManager;	
	private Color fFrameColor;
	private int fFinalCaretOffset= -1; 
	private Position fFramePosition;
	private int fCaretOffset;