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
if (Character.isJavaIdentifierPart(fChar)) {
			
			int from, to= pos + 1;
			pos= scanBackward(pos - 1, bound, fNonIdent);
			if (pos == NOT_FOUND)
				from= bound == UNBOUND ? 0 : bound + 1;
			else
				from= pos + 1;
			
			String identOrKeyword;
			try {
				identOrKeyword= fDocument.get(from, to - from);
			} catch (BadLocationException e) {
				return TokenEOF;
			}
			
			return getToken(identOrKeyword);
			
			
		} else {
			
			return TokenOTHER;
		}
		
	}
	/**
	 * Returns one of the keyword constants or <code>TokenIDENT</code> for a scanned identifier.
	 * 
	 * @param s a scanned identifier
	 * @return one of the constants defined in {@link Symbols}