Bug 41906 [typing] Code assists handles anonymous inner classes less than optimal
Type the following code and press return at the indicated cursor position. addActionListener(new ActionListener() { <<<cursor_position>>> ) You get the following code: addActionListener(new ActionListener() { ) } The normal brace and the curly brace should really be exchanged.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
private final IDocument fDocument;
			
			private int fLineIndex;
	
			/**
			 * Creates a line iterator.
			 */
			public LineIterator(String string) {
				fDocument= new Document(string);
			}
	
			/*
			 * @see java.util.Iterator#hasNext()
			 */
			public boolean hasNext() {
				return fLineIndex != fDocument.getNumberOfLines();
			}
	
			/*
			 * @see java.util.Iterator#next()
			 */
			public Object next() {
				try {
					IRegion region= fDocument.getLineInformation(fLineIndex++);
					return fDocument.get(region.getOffset(), region.getLength());
				} catch (BadLocationException e) {
					JavaPlugin.log(e);