Bug 43364 [typing] new line insertion sometimes goes wrong!
try and put a new line between the two variable declarations. It will shift the second variable declaration to line up with "c". ------------------------------------------------------------ public class A { private static final String[] var = new String[] { "a", "b", "c", "d"}; private static final int var2 = 4; //press enter at beginning of this line } ------------------------------------------------------------
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaIndenter.java
fScanner= scanner;
	}
	
	/**
	 * Computes the indentation at the reference point of <code>position</code>.
	 * 
	 * @param position the position in the document, either at the beginning of a line or in the 
	 * whitespace at the beginning of a line
	 * @return a String which reflects the indentation at the line in which the reference position
	 * to <code>position</code> resides, or <code>null</code> if it cannot be determined.
	 */
	public String getReferenceIndentation(int position) {
		
		try {
			
			
			
			boolean danglingElse= false;
			boolean matchBrace= false;
			
			if (position < fDocument.getLength()) {
				IRegion line= fDocument.getLineInformationOfOffset(position);
				int next= fScanner.nextToken(position, line.getOffset() + line.getLength());
				switch (next) {
					case Symbols.TokenEOF:
					case Symbols.TokenELSE:
						danglingElse= true;
						break;
					case Symbols.TokenRBRACE: 
						matchBrace= true;