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
private final char[] fChars;
		 
		/**
		 * Creates a new instance.
		 * @param ch the single character to match 
		 */
		public CharacterMatch(char ch) {
			this(new char[] {ch});
		}
		
		/**
		 * Creates a new instance.
		 * @param chars the chars to match.
		 */
		public CharacterMatch(char[] chars) {
			Assert.isNotNull(chars);
			Assert.isTrue(chars.length > 0);
			fChars= chars;
			Arrays.sort(chars);
		}
		
		/*
		 * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
		 */
		public boolean stop(char ch, int position, boolean forward) {
			return Arrays.binarySearch(fChars, ch) >= 0 && isDefaultPartition(position);
		}
	}