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
/**
	 * Creates a new SmartSemicolonAutoEditStrategy.
	 * 
	 * @param partitioning the document partitioning
	 */
	public SmartSemicolonAutoEditStrategy(String partitioning) {
		fPartitioning= partitioning;
	}
	/*
	 * @see org.eclipse.jface.text.IAutoEditStrategy#customizeDocumentCommand(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.DocumentCommand)
	 */
	public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
		
		
		
		
		if (command.text == null)
			return;
		if (command.text.equals(SEMICOLON))
			fCharacter= SEMICHAR;
		else if (command.text.equals(BRACE))
			fCharacter= BRACECHAR;
		else
			return;
		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		if (fCharacter == SEMICHAR && !store.getBoolean(PreferenceConstants.EDITOR_SMART_SEMICOLON))
			return;
		if (fCharacter == BRACECHAR && !store.getBoolean(PreferenceConstants.EDITOR_SMART_OPENING_BRACE))
			return;
		IWorkbenchPage page= JavaPlugin.getActivePage();