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.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
* 
	 * @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param partitioning the document partitioning
	 * @return <code>true</code> if <code>document</code> contains any of the above keywords to the left of <code>position</code>, <code>false</code> otherwise
	 */
	private static boolean looksLikeIfWhileForCatch(IDocument document, int position, String partitioning) {
		position= firstNonWhitespaceBackward(document, position, partitioning, -1);
		if (position == -1)
			return false;
		return looksLike(document, position, "if") 
				|| looksLike(document, position, "while") 
				|| looksLike(document, position, "catch") 
				|| looksLike(document, position, "synchronized") 
				|| looksLike(document, position, "switch") 
				|| looksLike(document, position, "for"); 
	}
	/**
	 * Checks whether code>document</code> contains the <code>String</code> <code>like</code> such 
	 * that its last character is at <code>position</code>. If <code>like</code> starts with a
	 * identifier part (as determined by {@link Character#isJavaIdentifier(char)}), it is also made
	 * sure that <code>like</code> is preceded by some non-identifier character or stands at the
	 * document start.
	 * 
	 * @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param like the <code>String</code> to look for.
	 * @return <code>true</code> if  <code>document</code> contains <code>like</code> such that it ends at <code>position</code>, <code>false</code> otherwise
	 */
	private static boolean looksLike(IDocument document, int position, String like) {