Bug 45349 [typing] Smart ; must replace selection
I20031015 1. enter "int a= 3;" 2. select "=3;" 3. press ";"
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
* @param partitioning the document partitioning
	 * @return the position where <code>character</code> should be inserted / replaced
	 */
	protected static int computeCharacterPosition(IDocument document, ITextSelection line, int offset, char character, String partitioning) {
		String text= line.getText();
		if (text == null)
			return 0;
		int insertPos;
		if (character == BRACECHAR) {
			insertPos= computeArrayInitializationPos(document, line, offset, partitioning);
			if (insertPos == -1) {
				insertPos= computeAfterTryDoElse(document, line, offset);
			}
			if (insertPos == -1) {
				insertPos= computeAfterParenthesis(document, line, offset, partitioning);
			}
		} else if (character == SEMICHAR) {
			if (isForStatement(text, offset)) {
				insertPos= offset;
			} else {
				int nextPartitionPos= nextPartitionOrLineEnd(document, line, offset, partitioning);
				insertPos= startOfWhitespaceBeforeOffset(text, nextPartitionPos);
				if (insertPos > 0 && text.charAt(insertPos - 1) == character)
					insertPos= offset;
			}
			
		} else {
			Assert.isTrue(false);
			return -1;
		}