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
while (validPosition == -1) {
				nextPartitionPos= partition.getOffset() - 1;
				if (nextPartitionPos <= docOffset) {
					validPosition= docOffset;
					break;
				}
				partition= TextUtilities.getPartition(document, partitioning, nextPartitionPos, false);
				validPosition= getValidPositionForPartition(document, partition, eol);
			}
		} catch (BadLocationException e) {
		}
		validPosition= Math.max(validPosition, docOffset);
		
		validPosition -= line.getOffset();
		return validPosition;
	}
	/**
	 * Returns a valid insert location (except for whitespace) in <code>partition</code> or -1 if
	 * there is no valid insert location. 
	 * An valid insert location is right after any java string or character partition, or at the end
	 * of a java default partition, but never behind <code>maxOffset</code>. Comment partitions or 
	 * empty java partitions do never yield valid insert positions.
	 * 
	 * @param doc the document being modified
	 * @param partition the current partition
	 * @param maxOffset the maximum offset to consider
	 * @return a valid insert location in <code>partition</code>, or -1 if there is no valid insert location
	 */
	private static int getValidPositionForPartition(IDocument doc, ITypedRegion partition, int maxOffset) {
		final int INVALID= -1;