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
indent=getIndentOfLine(line);
			}
			final int indentSize= calculateDisplayedWidth(indent, tabWidth);
			if (indentSize < minIndentSize)
				minIndentSize= indentSize;
		}
		return minIndentSize == Integer.MAX_VALUE ? 0 : minIndentSize;
	}
	/**
	 * Returns the displayed width of a string, taking in account the displayed tab width.
	 * The result can be compared against the print margin.
	 */
	private static int calculateDisplayedWidth(String string, int tabWidth) {
		int column= 0;
		for (int i= 0; i < string.length(); i++)
			if ('\t' == string.charAt(i))
				column += tabWidth - (column % tabWidth);
			else
				column++;
		return column;
	}
	private static boolean isLineEmpty(IDocument document, int line) throws BadLocationException {
		IRegion region= document.getLineInformation(line);
		String string= document.get(region.getOffset(), region.getLength());
		return string.trim().length() == 0;
	}
	private int getIndentSize(IDocument document, DocumentCommand command) {
		StringBuffer buffer= new StringBuffer();
		int docLength= document.getLength();
		if (command.offset == -1 || docLength == 0)