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
return;
			int peerOffset= getPeerPosition(document, command);
			peerOffset= indenter.findReferencePosition(peerOffset);
			refOffset= Math.min(refOffset, peerOffset);
			
			 
			IRegion line= document.getLineInformationOfOffset(offset);
			String notSelected= document.get(line.getOffset(), offset - line.getOffset());
			if (notSelected.trim().length() == 0) {
				command.length += notSelected.length();
				command.offset= line.getOffset();
			}
			
			
			IRegion refLine= document.getLineInformationOfOffset(refOffset);
			String prefix= document.get(refLine.getOffset(), command.offset - refLine.getOffset());
			
			
			Document temp= new Document(prefix + command.text);
			scanner= new JavaHeuristicScanner(temp);
			indenter= new JavaIndenter(temp, scanner);
			installJavaStuff(temp);
			
			
			
			
			
			boolean isIndentDetected= false;
			StringBuffer addition= new StringBuffer();
			int insertLength= 0;