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/LinkedPositionManager.java
* If another position with the same type and offset lower than <code>offset</code>
	 * exists, the position is skipped.
	 * 
	 * @return returns <code>null</code> if no linked position exist.
	 */
	public Position getNextPosition(int offset) {
		Position[] positions= getPositions(fDocument);
		return findNextPosition(positions, offset);
	}
	private static Position findNextPosition(Position[] positions, int offset) {
		
		for (int i= 0; i != positions.length; i++) {			
			if (positions[i].getOffset() > offset) {
				String type= ((TypedPosition) positions[i]).getType();
				int j;
				for (j = 0; j != i; j++)
					if (((TypedPosition) positions[j]).getType().equals(type))
						break;
				if (j == i)
					return positions[i];				
			}
		}
		return null;
	}
	
	/**
	 * Returns the position with the greatest offset smaller than <code>offset</code>.
	 *
	 * @return returns <code>null</code> if no linked position exist.
	 */