Bug 40038 [typing] Smart semicolon fooled by method braces
Build: I20030710 Start writing a setter method, like this: public void setValue(int i) {} Then position cursor between the braces and fill in the method body. You end up with this: public void setValue(int i) {this.value=i}; Problem: when you type the semicolon, it jumps over the closing method body brace and places it at the end of the line, resulting in a syntax error.
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/SmartSemicolonAutoEditStrategyTest.java
/**
	 * Testclass exposing the method to be tested
	 */
	private static class SmartSemicolon extends SmartSemicolonAutoEditStrategy {
		public SmartSemicolon() {
			super("");
		}
		
		public static int computeCharacterPosition(IDocument document, ITextSelection line, int offset, char character, String partitioning) {
			return SmartSemicolonAutoEditStrategy.computeCharacterPosition(document, line, offset, character, partitioning);
		}
	}
	
	public static Test suite() {
		return new TestSuite(SmartSemicolonAutoEditStrategyTest.class);
	}
	
	private DefaultPartitioner fPartitioner;
	private static final char SEMI= ';';
	private static final char BRACE= '{';
	private Document fDocument;
	public SmartSemicolonAutoEditStrategyTest() {
		fDocument= new Document();
		String[] types= new String[] {
			IJavaPartitions.JAVA_DOC,
			IJavaPartitions.JAVA_MULTI_LINE_COMMENT,
			IJavaPartitions.JAVA_SINGLE_LINE_COMMENT,
			IJavaPartitions.JAVA_STRING,
			IJavaPartitions.JAVA_CHARACTER,