This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using the Node API. Having uninited node instance which is of JavaNode type (retrieved from DataObject representing the java source): 1) Node javaNode = dataObject.getNodeDelegate(); 2) Node[] childNodes = javaNode.getChildren().getNodes(true); 3) Then the childNodes contain only the wait node (Please wait...). One would expect when calling the getNodes(true) (optimalResut == true!) that it will retrieve the real class nodes and not only the waiting node. I am not sure what is the contract of the API (or hack between showing the wait node and the real nodes), but there doesn't seem to be a possiblity safely to retrieve the class nodes from the uninited java node programatically, which I believe was getNodes(true) designed for.
This is probably about the SourceChildren code.
Sorry, but your expectations are odd. There is no such api contract that underneath JavaNode should appear any node. It is just a default implementation to provide some children that can be filtered by whatever view. By no means it is intended to access the java model. The Please Wait node is used to be able to lazy initialize children. Later it is replaced. But again it is an implementation detail not the api contract. As you can read in Children.getNodes(boolean) javadoc: "...But in general if you are trying to get useful data by calling this method, you are probably doing something wrong. Usually you should be asking some underlying model for information, not the nodes for children..." If you like send me more details about what you want to do and I will try to help you find a solution. Closing as invalid.
I am not saying that there should appear any certain nodes (that is part of a hack), but I am saying that getNodes(null) should return the inited nodes, not the temporary please wait ones. Also the findChild(name) should go via inited nodes, not the temporary ones. That is my API understanding. To solve the issue you could implement that if you will waitFinished for that task you spawn for model creation. To explain. I am using this as a hack, basically I need to get to the Bean Patterns node and reuse its NewTypes. I know that it sounds strange, but that seems to be ony possibility how to fix our problem (to provide the add property etc. action for other nodes then bean pattern node). Anyway, if there is other way then that to get to the NewTypes of bean pattern node, then please let me know. I didn't find other, more appropriate (Beans module doesn't provide any API).
Yes, getNodes(true) have to return real nodes. It seems to be broken. IMO better solution of your problem would be to register an own NodeFactory before the beans module's one and there you could override createClassNode the same way like the beans module does and use FilterChildren. At least you do not hurt the lazy initialization and you will workaround this issue.
OK, thanks for accepting this issue. To our problem. The problem is not about how to override the actual new types of certain node (class node), but about override thoes new types by which new types. I.e. how to get to the new types which create the bean properties. There is no such api from the beans module. That's why I was hacking this the way, somehow to find the bean node, and reuse its new types. Or is your suggestion to get the Beans node factory and gets the nodes from there?
This issue is no more valid. JavaNode does not have any children in 6.0.