Bug 82173 [5.0][typing] Angle Bracket<> auto closing should work in more situations
I20041221-0800 Angular Bracket auto closing does not work for a field type. In this example: void m() { HashMap hm= new HashMap(); ... ... an opening bracket < is - automatically closed when inserted between HashMap and () - not automatically closed when inserted between HashMap and hm. It should be closed in both cases.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaHeuristicScanner.java
break;
		}
		return TokenIDENT;
	}
	/**
	 * Returns the position of the closing peer character (forward search). Any scopes introduced by opening peers
	 * are skipped. All peers accounted for must reside in the default partition.
	 * 
	 * <p>Note that <code>start</code> must not point to the opening peer, but to the first
	 * character being searched.</p>
	 * 
	 * @param start the start position
	 * @param openingPeer the opening peer character (e.g. '{')
	 * @param closingPeer the closing peer character (e.g. '}')
	 * @return the matching peer character position, or <code>NOT_FOUND</code>
	 */
	public int findClosingPeer(int start, final char openingPeer, final char closingPeer) {
		Assert.isNotNull(fDocument);
		Assert.isTrue(start >= 0);
		
		try {
			int depth= 1;
			start -= 1;
			while (true) {
				start= scanForward(start + 1, UNBOUND, new CharacterMatch(new char[] {openingPeer, closingPeer}));
				if (start == NOT_FOUND)
					return NOT_FOUND;
					
				if (fDocument.getChar(start) == openingPeer)
					depth++;