This method uses introspection to programatically discover all of the parameters for this generic object. For each one of them it uses the TreeModel reference to create a new subtree to represent that parameter and its value ranges. Note that all of these nodes are PropertyNodes which themselves hold the logic of figuring out what type of parameter it is they are representing and thus what type of subtree to build.
We need to be careful because this was molded from the code inside of the PropertySheetPanel class. Which means that we are wide open to copy/paste problems. In the future, when that code changes to adapt to other changes in Weka then this could easily become broken.