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
return offset;
				
			p= firstNonWhitespaceBackward(document, p - 1, partitioning, -1);
			if (p == -1)
				return -1;
			
			ch= document.getChar(p);
			if (Character.isJavaIdentifierPart(ch) || ch == ']' || ch == '[')
				return offset;
	
		} catch (BadLocationException e) {
		}
		return -1;
	}
	/**
	 * Computes an insert position for an opening brace if <code>offset</code> maps to a position in
	 * <code>document</code> involving a keyword taking a block after it. These are: <code>try</code>, 
	 * <code>do</code>, <code>synchronized</code>, <code>static</code>, <code>finally</code>, or <code>else</code>.
	 * 
	 * @param document the document being modified
	 * @param line the current line under investigation
	 * @param offset the offset of the caret position, relative to the line start.
	 * @return an insert position  relative to the line start if <code>line</code> contains one of the above keywords at or before <code>offset</code>, -1 otherwise
	 */
	private static int computeAfterTryDoElse(IDocument doc, ITextSelection line, int offset) {
		
		int p= offset + line.getOffset();
		p= firstWhitespaceToRight(doc, p);
		if (p == -1)
			return -1;