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
final char CLOSING_PAREN= ')';
		final char OPENING_PAREN= '(';
		Assert.isTrue(position < document.getLength());
		Assert.isTrue(position >= 0);
		Assert.isTrue(isDefaultPartition(document, position, partitioning));
		try {
			Assert.isTrue(document.getChar(position) == CLOSING_PAREN);
			
			int depth= 1;
			while (true) {
				position= scanBackward(document, position - 1, partitioning, -1, new char[] {CLOSING_PAREN, OPENING_PAREN});
				if (position == -1)
					return -1;
					
				if (document.getChar(position) == CLOSING_PAREN)
					depth++;
				else
					depth--;
				
				if (depth == 0)
					return position;
			}
		} catch (BadLocationException e) {
			return -1;
		}
	}
	/**
	 * Checks whether, to the left of <code>position</code> and separated only by whitespace, 
	 * <code>document</code> contains a keyword taking a parameter list and a block after it.
	 * These are: <code>if</code>, <code>while</code>, <code>catch</code>, <code>for</code>, <code>synchronized</code>, <code>switch</code>.