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.

Bug 157632 - class node at the wrong place into the Model tree
Summary: class node at the wrong place into the Model tree
Status: NEW
Alias: None
Product: uml
Classification: Unclassified
Component: Reverse Engineering (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 17:11 UTC by ddv36a78
Modified: 2009-05-25 21:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ddv36a78 2009-01-29 17:11:16 UTC
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.
Comment 1 Sergey Petrov 2009-01-29 17:29:14 UTC
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.
Comment 2 ddv36a78 2009-01-29 17:34:42 UTC
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...
Comment 3 Sergey Petrov 2009-01-29 17:40:12 UTC
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.
Comment 4 Sergey Petrov 2009-01-29 17:41:42 UTC
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.
Comment 5 ddv36a78 2009-01-30 07:37:45 UTC
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.