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
/*******************************************************************************
 * Copyright (c) 2000, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.text.tests;
import junit.framework.Assert;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.text.rules.DefaultPartitioner;
import org.eclipse.jdt.internal.ui.text.FastJavaPartitionScanner;
import org.eclipse.jdt.internal.ui.text.IJavaPartitions;
import org.eclipse.jdt.internal.ui.text.java.SmartSemicolonAutoEditStrategy;
/**
 * SmartSemicolonAutoEditStrategyTest
 * @since 3.0
 */
public class SmartSemicolonAutoEditStrategyTest extends TestCase {