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
for (int i= 0; i != width; ++i)
				buffer.append(' ');
		} else {
			for (int i= 0; i != level; ++i)
				buffer.append('\t');
		}
		return buffer.toString();
	}
	/**
	 * Extends the string to match displayed width.
	 * String is either the empty string or "//" and should not contain whites.
	 */
	private static String changePrefix(String string, int displayedWidth, boolean useSpaces, int tabWidth) {
		
		final StringBuffer buffer= new StringBuffer(string);
		int column= calculateDisplayedWidth(buffer.toString(), tabWidth);
		if (column > displayedWidth)
			return string;
		
		if (useSpaces) {
			while (column != displayedWidth) {
				buffer.append(' ');
				++column;
			}
			
		} else {
			
			while (column != displayedWidth) {
				if (column + tabWidth - (column % tabWidth) <= displayedWidth) {
					buffer.append('\t');