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(getLineDelimiter(d));
						buf.append(d.get(start, length));
						buf.append('}');
					}
				}
			}
			c.text= buf.toString();
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
	}
	/**
	 * Computes an insert position for an opening brace if <code>offset</code> maps to a position in
	 * <code>document</code> with a expression in parenthesis that will take a block after the closing parenthesis.
	 * 
	 * @param document the document being modified
	 * @param offset the offset of the caret position, relative to the line start.
	 * @return an insert position relative to the line start if <code>line</code> contains a parenthesized expression that can be followed by a block, -1 otherwise
	 */
	private static int computeAnonymousPosition(IDocument document, int offset, int max) {
		
		
		
		int pos= offset;
		int length= max;
		int scanTo= scanForward(document, pos, length, '}');
		if (scanTo == -1)