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
if (Character.isWhitespace(ch) && p != position)
					return p + 1;
				else
					return -1;
			}
			
			return 0;
		} catch (BadLocationException e) {
		}
		return -1;
	}
	/**
	 * Returns a position in the first java partition after the last non-empty and non-comment partition.
	 * There is no non-whitespace from the returned position to the end of the partition it is contained in.
	 * 
	 * @param document the document being modified
	 * @param line the line under investigation
	 * @param offset the caret offset into <code>line</code>
	 * @param partitioning the document partitioning
	 * @return the position of the next Java partition, or the end of <code>line</code>
	 */
	private static int nextPartitionOrLineEnd(IDocument document, ITextSelection line, int offset, String partitioning) {
		
		final int docOffset= offset + line.getOffset();
		final int eol= line.getOffset() + line.getLength();
		int nextPartitionPos= eol; 
		int validPosition= docOffset;
		try {
			ITypedRegion partition= TextUtilities.getPartition(document, partitioning, nextPartitionPos, true);
			validPosition= getValidPositionForPartition(document, partition, eol);