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.text.tests/src/org/eclipse/jdt/text/tests/BracketInserterTest.java
type('t');
		type('<');
		
		assertEquals("Test<>", fDocument.get(BODY_OFFSET, 6));
		assertEquals(BODY_OFFSET + 5, getCaret());
		
		LinkedModeModel model= LinkedModeModel.getModel(fDocument, BODY_OFFSET + 5);
		assertNotNull(model);
		assertFalse(model.isNested());
		LinkedPosition position= model.findPosition(new LinkedPosition(fDocument, BODY_OFFSET + 5, 0));
		assertNotNull(position);
		assertEquals(BODY_OFFSET + 5, position.getOffset());
		assertEquals(0, position.getLength());
	}
	
	
	
	/**
	 * Type a character into the styled text.
	 * 
	 * @param character the character to type
	 */
	private void type(char character) {
		type(character, 0, 0);
	}
	/**
	 * Type a character into the styled text.
	 * 
	 * @param character the character to type
	 * @param keyCode the key code