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
* @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param partitioning the document partitioning
	 * @param bound the first position in <code>document</code> to not consider any more, with <code>scanTo</code> &gt; <code>position</code>
	 * @param chars an array of <code>char</code> to search for
	 * @return the highest position of one element in <code>chars</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>-1</code> if none can be found
	 */
	private static int scanBackward(IDocument document, int position, String partitioning, int bound, char[] chars) {
		Assert.isTrue(bound >= -1);
		Assert.isTrue(position < document.getLength() );
		
		Arrays.sort(chars);
		
		try {
			while (position > bound) {
				if (Arrays.binarySearch(chars, document.getChar(position)) >= 0 && isDefaultPartition(document, position, partitioning))
					return position;
				position--;
			}
		} catch (BadLocationException e) {
		}
		return -1;
	}
   
 
/
	/**
	 * Finds the lowest position in <code>document</code> such that the position is &gt;= <code>position</code>
	 * and &lt; <code>bound</code> and <code>document.getChar(position) == ch</code> evaluates to <code>true</code> for at least one
	 * ch in <code>chars</code> and the position is in the default partition.