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 91851 - Imported elements disappear on IDE restart
Summary: Imported elements disappear on IDE restart
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Yang Su
URL:
Keywords:
: 114310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-04 17:50 UTC by pmillssc
Modified: 2007-10-05 17:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NetBeans startup log (17.49 KB, text/plain)
2007-01-04 17:53 UTC, pmillssc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pmillssc 2007-01-04 17:50:05 UTC
1) Create a web application with a servlet and a EJB application with a session
bean.
2) Create UML projects by reverse engineering each of the above.
3) Import the bean class into the Web UML project.
4) Create a sequence diagram with both classes and save
5) Restart NetBeans

The "Imported Elements" section of the Web UML tree is now empty.  On opening
the sequence diagram, the class box for the bean (top of diagram) is empty
though the life line is named correctly.  Moving the life line for the bean
causes its header to become empty.

Attempts to "re-import" the missing class fail silently.
Comment 1 pmillssc 2007-01-04 17:53:59 UTC
Created attachment 37051 [details]
NetBeans startup log
Comment 2 Peter Lam 2007-01-30 01:00:53 UTC
in order to understand the importing issue, please provide steps on how you did
the importing of the bean class into the uml project.
Comment 3 pmillssc 2007-01-30 14:18:29 UTC
I've attempted importing two different ways:
1) Drag the bean from the EJB-based UML project's model to the Web-based one and
click "No" on the dialog that says, "Click Yes to move the elements into the
destination project, No to import the elements".  This usually fails to import
anything (a different bug!), but I believe that was the way I originally got the
results I posted.

2) More predictably, I can create a sequence diagram in the Web-based UML
project and then drag the bean model item into the diagram from the other UML
project.  That causes the other project to show up under "Imported Elements" and
behave reasonably until a NetBeans restart, at which point I get the errors that
I described.
Comment 4 Yang Su 2007-09-25 19:10:32 UTC
*** Issue 114310 has been marked as a duplicate of this issue. ***
Comment 5 Yang Su 2007-09-25 19:24:18 UTC
We cannot reproduce, please make sure the original project is also loaded in IDE before attempting to expand 'Imported
Elements' node, it's a requirement for imported elements to work properly.
Comment 6 Yang Su 2007-09-27 19:45:02 UTC
Reopen the issue as we have a reliable reproducible case, thanks to Iwan, see issue 114310.

basic steps:
1. create uml project 1 with an element say class1 (note, it does not have to be under a package)
2. create uml project 2 with a package, say pkg ( this is crucial)
3. create a class diagram under pkg
4. drag class1 from project 1 to diagram created in #3
5. verify that class1 should appear under project 2 -> "Imported Elements"
6. save all and exit IDE
7. restart IDE, expand project 2 -> "Imported Elements", class1 isn't there.

The issue is that any elements imported into a sub package (as opposed to top level) are not properly loaded when IDE
restarts. The good news is the saved model data appears to be correct, it's the flaw in retrieving imported elements and
populating the tree that caused the trouble.


Comment 7 Peter Lam 2007-09-27 22:01:40 UTC
sounds like issue 116902 might be related to this.
Comment 8 Yang Su 2007-10-04 00:40:51 UTC
implemented /corrected logic to resolve imported elements through external model data file.

IDE:-------------------------------------------------
IDE: [10/3/07 4:29 PM] Diffing "Classifier.java" started
IDE: [10/3/07 4:29 PM] Diffing "Classifier.java" finished

IDE:-------------------------------------------------
IDE: [10/3/07 4:33 PM] Committing Files started
Checking in support/umlsupport/URILocator.java;
/cvs/uml/core/src/org/netbeans/modules/uml/core/support/umlsupport/URILocator.java,v  <--  URILocator.java
new revision: 1.4; previous revision: 1.3
done
Checking in metamodel/structure/Project.java;
/cvs/uml/core/src/org/netbeans/modules/uml/core/metamodel/structure/Project.java,v  <--  Project.java
new revision: 1.6; previous revision: 1.5
done
Checking in metamodel/core/foundation/ExternalFileManager.java;
/cvs/uml/core/src/org/netbeans/modules/uml/core/metamodel/core/foundation/ExternalFileManager.java,v  <-- 
ExternalFileManager.java
new revision: 1.4; previous revision: 1.3
done
IDE: [10/3/07 4:34 PM] Committing Files finished

IDE:-------------------------------------------------
IDE: [10/3/07 4:35 PM] Committing Files started
Checking in nodes/ImportedProjectChildren.java;
/cvs/uml/projectui/src/org/netbeans/modules/uml/project/ui/nodes/ImportedProjectChildren.java,v  <-- 
ImportedProjectChildren.java
new revision: 1.6; previous revision: 1.5
done
Checking in nodes/Bundle.properties;
/cvs/uml/projectui/src/org/netbeans/modules/uml/project/ui/nodes/Bundle.properties,v  <--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
Checking in nodes/ImportProjectRootNode.java;
/cvs/uml/projectui/src/org/netbeans/modules/uml/project/ui/nodes/ImportProjectRootNode.java,v  <-- 
ImportProjectRootNode.java
new revision: 1.5; previous revision: 1.4
done
Checking in customizer/UMLImportsUiSupport.java;
/cvs/uml/projectui/src/org/netbeans/modules/uml/project/ui/customizer/UMLImportsUiSupport.java,v  <-- 
UMLImportsUiSupport.java
new revision: 1.6; previous revision: 1.5
done
Checking in customizer/ImportElementListener.java;
/cvs/uml/projectui/src/org/netbeans/modules/uml/project/ui/customizer/ImportElementListener.java,v  <-- 
ImportElementListener.java
new revision: 1.4; previous revision: 1.3
done
IDE: [10/3/07 4:35 PM] Committing Files finished
Comment 9 Peter Lam 2007-10-05 17:32:53 UTC
verified in instrumented trunk build 200710050219.

pmillssc, please verify with the latest daily build. If the problem still exists for you, please re-open this issue. Thanks.