Assert.isTrue(position < document.getLength());
	private static int searchForClosingPeer(IDocument document, int position, final char openingPeer, final char closingPeer) {		Assert.isTrue(position < document.getLength());		Assert.isTrue(position >= 0);		Assert.isTrue(isDefaultPartition(document, position));		try {			int length= document.getLength();			int depth= 1;			position -= 1;			while (true) {				position= scanForward(document, position + 1, length, new char[] {openingPeer, closingPeer});				if (position == -1)					return -1;									if (document.getChar(position) == openingPeer)					depth++;				else					depth--;								if (depth == 0)					return position;			}		} catch (BadLocationException e) {			return -1;		}	}