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.
I have just created 2 classes under 'test' package: public class A { } public class B extends A { } I select the B class and run 'Reverse Engineer'. A new project is created for storing UML model. Just fine. A node called 'B' under 'Model/test' tree but the node called 'A' is created not under 'Model/test', but just under 'Model' ! Wrong place, because both classes belong to the 'test' package.
yes, uml need to resolve dependent types better, in his case only B is resolved directly from java project and A is created based on info in B code. in described sample it's much better to RE test package or entire java project, so have a workaround.
After having done the previous steps, if I try a workaround selecting the class 'A' myself and calling 'Reverse Engineer', a node 'A' is correctly created under 'Model/tree'. But now, there are 2 nodes 'A' into the UML model...
yes.. RE do not delete smth from model, you may not want to lose some part of mdel if re from dirrent sources for example but it alsways possible to create new uml project if it should be new and clear from artifacts. also re on B and then re on A most likely will not create correct dependencies between these clases, because both are parsed separately.
workaround is to re on both classes (at one time, not first on B and then on A)/ or re on test package or re on java project.
Suggestion for another solution: when a RE is done on the class B, ok, the 'B' node is created at the right place. My suggestion is the following : - you may not need resolve dependent types better, - just create the 'A' node as today, but at the right place, under 'Model/test', just like the 'B' node. - associate the 'A' node with a '?' mark/icon, to illustrate that the 'A' node has NOT been RE (so the user would know), and keep the link (into this node) between this 'A' node and the 'A' class. - then, when the A class is RE, just update the associated 'A' node. - in a perfect world ;-) if reachable, it would be possible to right-click on the '?' 'A' node, and to choose RE entry: with the link 'A' node/A class, NetBeans could retrieve the A class and RE it.