int parentIndex = 0;
ITreeRowModel treeModel = treeLayer.getModel();
List<Integer> childIndexes = treeModel.getChildIndexes(parentIndex);
Collections.reverse(childIndexes);
childIndexes.add(parentIndex);
System.out.println(childIndexes);
for (Integer index : childIndexes) {
if (treeModel.isCollapsed(index) == false) {
treeLayer.collapseTreeRow(index);
}
}
java.lang.NullPointerException
at ca.odell.glazedlists.impl.adt.barcode2.FourColorTree.get(FourColorTree.java:169)
at ca.odell.glazedlists.TreeList.getTreeNode(TreeList.java:302)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeData.getChildren(GlazedListTreeData.java:76)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeRowModel.getChildIndexes(GlazedListTreeRowModel.java:89)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeRowModel.getChildIndexes(GlazedListTreeRowModel.java:93)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeRowModel.getChildIndexes(GlazedListTreeRowModel.java:93)