Bug 49945 Typing a brace destroys subsequent character
I20040106 + plugin-export 20040108_1804 Typing a brace destroys the subsequent '/' character: public class Example { public Example() { } // <- insert '{' before comment public static void main(String[] args) { } } All Preferences 'Java > Editor > Typing' have the default setting.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
int first= document.computeNumberOfLines(prefix);
			int lines= temp.getNumberOfLines();
			for (int l= first; l < lines; l++) { 
				
				IRegion r= temp.getLineInformation(l);
				int lineOffset= r.getOffset();
				int lineLength= r.getLength();
				
				if (lineLength == 0) 
					continue;
				
				if (!isIndentDetected){
					
					
					String current= getCurrentIndent(temp, l);
					StringBuffer correct= indenter.computeIndentation(lineOffset);
					if (correct == null)
						return; 
					
					insertLength= subtractIndent(correct, current, addition);
					if (l != first)
						isIndentDetected= true;
				}
				
				 
				if (insertLength > 0)
					addIndent(temp, l, addition);
				else if (insertLength < 0)
					cutIndent(temp, l, -insertLength);