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
}
		
		return false;
	}
	/**
	 * Checks whether code>document</code> contains the <code>String</code> <code>like</code> such 
	 * that its last character is at <code>position</code>. If <code>like</code> starts with a
	 * identifier part (as determined by {@link Character.isJavaIdentifier(char)}), it is also made
	 * sure that <code>like</code> is preceded by some non-identifier character or stands at the
	 * document start.
	 * 
	 * @param document the document being modified
	 * @param position the first character position in <code>document</code> to be considered
	 * @param like the <code>String</code> to look for.
	 * @return <code>true</code> if  <code>document</code> contains <code>like</code> such that it ends at <code>position</code>, <code>false</code> otherwise
	 */
	private static boolean looksLike(IDocument document, int position, String like) {
		int length= like.length();
		if (position < length - 1)
			return false;
		try {
			if (!like.equals(document.get(position - length + 1, length)))
				return false;
			if (position >= length && Character.isJavaIdentifierPart(like.charAt(0)) && Character.isJavaIdentifierPart(document.getChar(position - length)))
				return false;
		} catch (BadLocationException e) {
			return false;
		}
		return true;
	}