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
int length= like.length();
		if (position < length - 1)
			return false;
		try {
			if (!like.equals(document.get(position - length + 1, length)))
				return false;
			if (position >= length && Character.isJavaIdentifierPart(like.charAt(0)) && Character.isJavaIdentifierPart(document.getChar(position - length)))
				return false;
		} catch (BadLocationException e) {
			return false;
		}
		return true;
	}
	/**
	 * Checks whether the content of <code>document</code> at <code>position</code> looks like a
	 * method declaration header (i.e. only the return type and method name). <code>position</code>
	 * must be just left of the opening parenthesis of the parameter list.
	 * 
	 * @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 the content of <code>document</code> looks like a method definition, <code>false</code> otherwise
	 */
	private static boolean looksLikeMethodDecl(IDocument document, int position, String partitioning) {
		
		
		position= eatIdentToLeft(document, position, partitioning);
		if (position < 1)
			return false;