Bug 16879 Double click after { does not always select the right block of code.
Past the following code in a java text editor public void foo() { String aString = "AAAAAAAAAAAAAAAAA"; String s1[] = new String[]{aString}; String s2[] = new String[]{"aaaa"}; Object o1[] = new Object[][]{{aString},{aString}}; } 1) Doubleclick after { in the line "String s1[]". It will select the code between { and }. Good. 2) Now doubleclick after the first { in the line "String s2[]". It will select aaaa without including the ". It should select everything between { and }. 3) Now doubleclick after the first { in the line "Object o1[]". It will select the contents of the second { instead of the first one.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaPairMatcher.java
protected int fStartPos;
	protected int fEndPos;
	protected int fAnchor;
	
	protected JavaCodeReader fReader= new JavaCodeReader();
	
	
	public JavaPairMatcher(char[] pairs) {
		fPairs= pairs;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#match(org.eclipse.jface.text.IDocument, int)
	 */
	public IRegion match(IDocument document, int offset) {
		fOffset= offset;
		if (fOffset < 0)
			return null;
		fDocument= document;
		if (fDocument != null && matchPairsAt() && fStartPos != fEndPos)
			return new Region(fStartPos, fEndPos - fStartPos + 1);
			
		return null;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
	 */
	public int getAnchor() {