Bug 41849 [typing] LinkedPositionManager sets illegal positions
Eclipse: 200308201005 on Mac OS X Jaguar Files I'm editing and saving are not being saved to disk. There are no errors in the logs. It appears that this is an editor problem, because the compiler compiles what is on disk. Chang
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionManager.java
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.
	 */
	public Position getPreviousPosition(int offset) {
		Position[] positions= getPositions(fDocument);
		if (positions == null)
			return null;
		TypedPosition currentPosition= (TypedPosition) findCurrentPosition(positions, offset);
		String currentType= currentPosition == null ? null : currentPosition.getType();
		Position lastPosition= null;
		Position position= getFirstPosition();
		while (position != null && position.getOffset() < offset) {
			if (!((TypedPosition) position).getType().equals(currentType))
				lastPosition= position;
			position= findNextPosition(positions, position.getOffset());
		}
		
		return lastPosition;
	}
	private Position[] getPositions(IDocument document) {
		try {