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
String type= fDocument.get(offset, length);
		addPosition(offset, length, type);
	}
	
	/**
	 * Adds a linked position of the specified position type to the manager. 
	 * There are the following constraints for linked positions:
	 * 
	 * <ul>
	 *   <li>Any two positions have spacing of at least one character.
	 *       This implies that two positions must not overlap.</li>
	 *
	 *   <li>The string at any position must not contain line delimiters.</li>
	 * </ul>
	 * 
	 * @param offset the offset of the position.
	 * @param length the length of the position.
	 * @param type the position type name - any positions with the same type are linked.
	 */
	public void addPosition(int offset, int length, String type) throws BadLocationException {
		Position[] positions= getPositions(fDocument);
		if (positions != null) {
			for (int i = 0; i < positions.length; i++)
				if (collides(positions[i], offset, length))
					throw new BadLocationException(LinkedPositionMessages.getString(("LinkedPositionManager.error.position.collision"))); 
		}
		
		String content= fDocument.get(offset, length);		
		if (containsLineDelimiters(content))
			throw new BadLocationException(LinkedPositionMessages.getString(("LinkedPositionManager.error.contains.line.delimiters")));