Bug 40205 automatically insert closing brace: does not handle '//' in strings
200307150800 1. Try this snippet { String s= "//"; void m() <CURSOR> } 2. Insert an opening brace 3. Press <ENTER> The expected closing brace does not get inserted
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
final int length= string.length();
		int i= 0;
		while (i != length && Character.isWhitespace(string.charAt(i)))
			++i;
		if (i == length)
			return false;
		return string.charAt(i) == '}';
	}
	private void smartPaste(IDocument document, DocumentCommand command) {
		String lineDelimiter= getLineDelimiter(document);
		try {
			String pastedText= command.text;
			Assert.isNotNull(pastedText);
			Assert.isTrue(pastedText.length() > 1);
			
			
			int selectionStart= command.offset;
			IRegion region= document.getLineInformationOfOffset(selectionStart);
			String notSelected= document.get(region.getOffset(), selectionStart - region.getOffset());
			String selected= document.get(selectionStart, region.getOffset() + region.getLength() - selectionStart);
			if (notSelected.trim().length() == 0 && selected.trim().length() != 0) {
				pastedText= notSelected + pastedText;
				command.length += notSelected.length();
				command.offset= region.getOffset();
			}
			
			 
			String blockIndent= getBlockIndent(document, command);
			String insideBlockIndent= blockIndent == null ? "" : blockIndent + createIndent(1, useSpaces()); 
			int insideBlockIndentSize= calculateDisplayedWidth(insideBlockIndent, getTabWidth());