Bug 61759 [typing] Smart semicolon does not work at end of string literal
I20040506 0. smart semicolon is on, smart typing mode 1. have this code: String s= "asdfasdf<caret>" 2. press SEMICOLON -> expected: semicolon gets inserted after the closing quotation mark -> real: the semicolon is inserted at the caret position -> note that it works if the caret position is not before the closing quotation mark.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
*/
	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= -1; 
			} else {
				int nextPartitionPos= nextPartitionOrLineEnd(document, line, offset, partitioning);
				insertPos= startOfWhitespaceBeforeOffset(text, nextPartitionPos);
				
				if (insertPos > 0 && text.charAt(insertPos - 1) == character)
					insertPos= insertPos - 1;
			}
			
		} else {
			Assert.isTrue(false);
			return -1;
		}
		return insertPos;