Bug 40772 [plan item] Smart tab on empty lines
When having the caret on an empty line, pressing tab cleans up the line and sets the caret it the right indentation column.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
int depth= 1;
			position -= 1;
			while (true) {
				position= scanForward(document, position + 1, partitioning, length, new char[] {openingPeer, closingPeer});
				if (position == -1)
					return -1;
					
				if (document.getChar(position) == openingPeer)
					depth++;
				else
					depth--;
				
				if (depth == 0)
					return position;
			}
		} catch (BadLocationException e) {
			return -1;
		}
	}
	private static int searchForOpeningPeer(IDocument document, int position, String partitioning, final char openingPeer, final char closingPeer) {
		Assert.isTrue(position < document.getLength());
		try {
			int depth= 1;
			position += 1;
			while (true) {
				position= scanBackward(document, position - 1, partitioning, -1, new char[] {openingPeer, closingPeer});
				if (position == -1)
					return -1;
					
				if (document.getChar(position) == closingPeer)