Skip to main content

Platform and Equinox API

Platform Changes

Auto-Expand for Single Child Elements in JFace Tree Viewers

The API method org.eclipse.jface.viewers.AbstractTreeViewer.setAutoExpandOnSingleChildLevels(int level) was added to JFace. If this method is called on a tree viewer with some positive value or the constant ALL_LEVELS, expanding a tree item that only has a single child element will lead to a recursive expansion of child items. The recursive expansion stops once an item has more than one child item or the number of expansions reaches the value passed to the method.

To ensure backwards compatibility, this feature is disabled by default. Each instantiation of a concrete implementation of AbstractTreeViewer is responsible for enabling this feature if needed.

Previous Up Next

Back to the top