document.replace(command.offset, 0, String.valueOf(getClosingCharacter(character)));
document.replace(command.offset + command.length, 0, String.valueOf(getClosingCharacter(character)));
	private void smartIndentAfterBlockDelimiter(IDocument document, DocumentCommand command) {		try {			final char character= command.text.charAt(0);			IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();			switch (character) {			case '}':				smartInsertAfterBracket(document, command);				break;			// creating closing peer character			case '(':				if (preferenceStore.getBoolean(CompilationUnitEditor.CLOSE_BRACKETS) &&					(command.offset == document.getLength() ||					Character.isWhitespace(document.getChar(command.offset))))				{					command.doit= false;					document.replace(command.offset, 0, String.valueOf(getClosingCharacter(character)));				}				break;			case '[':				if (preferenceStore.getBoolean(CompilationUnitEditor.CLOSE_BRACKETS)) {					command.doit= false;					document.replace(command.offset, 0, String.valueOf(getClosingCharacter(character)));				}				break;							case '\"':				if (preferenceStore.getBoolean(CompilationUnitEditor.CLOSE_STRINGS)) {					command.doit= false;					document.replace(command.offset, 0, String.valueOf(getClosingCharacter(character)));				}				break;			// try eating closing peer character			case ')':			case ']':				if (preferenceStore.getBoolean(CompilationUnitEditor.SKIP_CLOSING_BRACKETS) &&					document.getChar(command.offset) == character)				{					command.length++;				}				break;			}		} catch (BadLocationException e) {			System.out.println(JavaTextMessages.getString("AutoIndent.error.bad_location.message1")); //$NON-NLS-1$		}	}