Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333728

Summary: Inconsistent entity names in the diagram and the java sources
Product: [WebTools] Dali JPA Tools Reporter: Krum Bakalsky <bakalsky>
Component: Diagram EditorAssignee: Stefan Dimov <stefan.dimov>
Status: RESOLVED FIXED QA Contact: Stefan Dimov <stefan.dimov>
Severity: normal    
Priority: P3 CC: petya.sabeva
Version: 0.5   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Krum Bakalsky CLA 2011-01-07 03:55:36 EST
Created attachment 186250 [details]
Screenshot

Hi,

I am using 64-bit Windows 7 Ultimate, with Sun Java 1.6.0_20 JDK installed. I
have installed the latest "Eclipse IDE for Java EE developers" for "Windows 64
Bit" platform, it is Helios.
I have installed the latest JPA Diagram Editor from its dedicated Eclipse page:
http://wiki.eclipse.org/JPA_Diagram_Editor_Project.

Scenario to reproduce:
0. Create some project with JPA 1.0 facet.
1. Open a clean fresh diagram for the project, create some entities, play around (add attributes, change entity names, etc.).
2. Remove all the created entities, both from the diagram, and as Java sources, leave the persistence.xml to have only the <persistence-unit name="TestJPAEditor"></persistence-unit> tag.
3. Open again  the diagram for the project. Create two Inherited entities. 

Problem:
It seems that the editor has some problems with choosing the name of the first one - in the java sources, it is Entity1, but in the diagram it is Company. See the attached screenshot. The tooltip message shows one name, the diagram - other name. It seems that somehows the editor remembers the names of the last created entities, although they are no longer existing. The problem is that the f

Hint: I did experience the same issue with the editor remembering last entity names, in a couple of other problematic scenarios.
Comment 1 Petya Sabeva CLA 2011-01-20 09:05:55 EST
Hi,

actually I think that this is not related with the JPA Editor, because I had already reproduced this issue without using of the JPA Editor. I think that the problem is that the JPA model is not always refreshed properly.
Comment 2 Stefan Dimov CLA 2011-01-26 10:20:37 EST
I'll try to reproduce it ...
Comment 3 Stefan Dimov CLA 2011-02-22 10:10:26 EST
I've made some fixes related to compilation unit leak and seems that I can't reproduce the problem, but I'm not 100% sure that it's fixed.

Krum, would you please retest? Please use my installation of Indigo - \\10.55.71.114\Indigo_M5 with new workspace, sync the last version of JPA Diagram Editor from CVS:/cvsroot/webtools HEAD branch - org.eclipse.jpa/components/jpa_diagram_editor/plugins/org.eclipse.jpt.ui.diagrameditor

and start new runtime IDE.
Comment 4 Krum Bakalsky CLA 2011-04-15 07:23:31 EDT
Hi Stefan,

Sorry for the delay of this retesting. I did it, and the problem was gone, I didn't observe this behaviour.

In my environment, I used the WTP SDK from the latest I-build, as agreed. For the JPA Diagram Editor, I used HEAD from CVS.



Greetings,
Krum.
Comment 5 Stefan Dimov CLA 2011-04-15 07:26:10 EDT
10x Krum. Closing the bug ...