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
buf.append(getIndentOfLine(d, indLine));
			} else {
				int start= d.getLineOffset(line);
				
				IDocumentPartitioner partitioner= d.getDocumentPartitioner();
				if (partitioner != null) {
					ITypedRegion region= partitioner.getPartition(start);
					if (IJavaPartitions.JAVA_DOC.equals(region.getType()))
						start= d.getLineInformationOfOffset(region.getOffset()).getOffset();
				}
				int whiteend= findEndOfWhiteSpace(d, start, c.offset);
				int length= whiteend - start;
				buf.append(d.get(start, length));
				if (getBracketCount(d, start, c.offset, true) > 0) {
					
					buf.append(createIndent(1, useSpaces()));
					
					if (fHasTypedBrace && closeBrace() && !isClosed(d, c.offset, c.length)) {
						c.caretOffset= c.offset + buf.length();
						c.shiftsCaret= false;
						
						
						
						IRegion reg= d.getLineInformation(line);
						int lineEnd= reg.getOffset() + reg.getLength();
						if (!(computeAnonymousPosition(d, c.offset - 1, lineEnd) != -1)) {
							int contentStart= findEndOfWhiteSpace(d, c.offset, lineEnd);
							if (lineEnd - contentStart > 0) {
								c.length=  lineEnd - c.offset;
								buf.append(d.get(contentStart, lineEnd - contentStart).toCharArray());