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
}
	
	/**
	 * Returns the reference position regarding to indentation for <code>position</code>, or
	 * <code>NOT_FOUND</code>. <code>fIndent</code> will contain the relative indentation (in 
	 * indentation units, not characters) after the call. If there is a special alignment (e.g. for
	 * a method declaration where parameters should be aligned), <code>fAlign</code> will contain the absolute
	 * position of the alignment reference in <code>fDocument</code>, otherwise <code>fAlign</code>
	 * is set to <code>JavaHeuristicScanner.NOT_FOUND</code>.
	 * 
	 * @param position the position for which the reference is computed
	 * @return the reference statement relative to which <code>position</code> should be indented.
	 */
	public int findReferencePosition(int position) {
		return findReferencePosition(position, false, false);
	}
	
	/**
	 * Returns the reference position regarding to indentation for <code>position</code>, or
	 * <code>NOT_FOUND</code>. <code>fIndent</code> will contain the relative indentation (in 
	 * indentation units, not characters) after the call. If there is a special alignment (e.g. for
	 * a method declaration where parameters should be aligned), <code>fAlign</code> will contain the absolute
	 * position of the alignment reference in <code>fDocument</code>, otherwise <code>fAlign</code>
	 * is set to <code>JavaHeuristicScanner.NOT_FOUND</code>.
	 * 
	 * @param position the position for which the reference is computed
	 * @param danglingElse whether a dangling else should be assumed at <code>position</code>
	 * @param matchBrace whether the position of the matching brace should be returned instead of doing code analysis
	 * @return the reference statement relative to which <code>position</code> should be indented.
	 */