while ((position != null) && (position.getOffset() < offset)) {
while ((position != null) && (position.getOffset() < offset) && !((TypedPosition) position).getType().equals(currentType)) {
	public Position getPreviousPosition(int offset) {		Position[] positions= getPositions(fDocument);				if (positions == null)			return null;		Position lastPosition= null;		Position position= getFirstPosition();				while ((position != null) && (position.getOffset() < offset)) {			lastPosition= position;			position= findNextPosition(positions, position.getOffset());		}						return lastPosition;	}