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
if (page == null)
			return;
		IEditorPart part= page.getActiveEditor();
		if (!(part instanceof CompilationUnitEditor))
			return;
		CompilationUnitEditor editor= (CompilationUnitEditor)part;
		if (editor.getInsertMode() != ITextEditorExtension3.SMART_INSERT || !editor.isEditable())
			return;
		ITextEditorExtension2 extension= (ITextEditorExtension2)editor.getAdapter(ITextEditorExtension2.class);
		if (extension != null && !extension.validateEditorInputState())
			return;
		
		int pos= command.offset;
		ITextSelection line;
		try {
			IRegion l= document.getLineInformationOfOffset(pos);
			line= new TextSelection(document, l.getOffset(), l.getLength());
		} catch (BadLocationException e) {
			return;
		}
		
		
		int positionInLine= computeCharacterPosition(document, line, pos - line.getOffset(), fCharacter, fPartitioning);
		int position= positionInLine + line.getOffset();
		
		if (position < pos)
			return;
		 
		if (alreadyPresent(document, fCharacter, position))
			return;