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
* @param ch the character to measure
	 * @return the visual length of <code>ch</code>
	 */
	private static int computeVisualLength(char ch) {
		if (ch == '\t')
			return getVisualTabLengthPreference();
		else
			return 1;
	}
	/**
	 * The preference setting for the visual tabulator display.
	 *  
	 * @return the number of spaces displayed for a tabulator in the editor
	 */
	private static int getVisualTabLengthPreference() {
		return JavaPlugin.getDefault().getPreferenceStore().getInt(PreferenceConstants.EDITOR_TAB_WIDTH);
	}
	private static int getPeerPosition(IDocument document, DocumentCommand command) {
    	/*
    	 * Search for scope closers in the pasted text and find their opening peers
    	 * in the document. 
    	 */
    	Document pasted= new Document(command.text);
    	installJavaStuff(pasted);
    	int firstPeer= command.offset;
    	
    	JavaHeuristicScanner pScanner= new JavaHeuristicScanner(pasted);
    	JavaHeuristicScanner dScanner= new JavaHeuristicScanner(document);