Community
Participate
Working Groups
Build Identifier: 20110218-0911 loadedNum variable identifying in class XViewer.java in method updateStatusLabel() must be changed from: loadedNum = ((ITreeContentProvider) getContentProvider()).getChildren(getRoot()).length; to: loadedNum = ((ITreeContentProvider) getContentProvider()).getElements(getRoot()).length; Reproducible: Always
According to the javadoc (see below), getChildren(getRoot()) is just as valid as getElement(getRoot()). Notice the "(including a root)". What's the reason you want/need this changed? /** * Returns the child elements of the given parent element. * <p> * The difference between this method and <code>IStructuredContentProvider.getElements</code> * is that <code>getElements</code> is called to obtain the * tree viewer's root elements, whereas <code>getChildren</code> is used * to obtain the children of a given parent element in the tree (including a root). * </p> * The result is not modified by the viewer. * * @param parentElement the parent element * @return an array of child elements */ public Object[] getChildren(Object parentElement);
Given the above reasons, this bug is not valid.
closing bug