Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322514 - JPA editor should be able to create java entity from mapped superclass
Summary: JPA editor should be able to create java entity from mapped superclass
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Diagram Editor (show other bugs)
Version: 0.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.5 RC2   Edit
Assignee: Petya Sabeva CLA
QA Contact: Stefan Dimov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 07:59 EDT by Stefan Dimov CLA
Modified: 2011-01-17 08:13 EST (History)
0 users

See Also:


Attachments
patch (26.13 KB, patch)
2010-08-26 04:03 EDT, Petya Sabeva CLA
no flags Details | Diff
Patch is updated... (27.00 KB, patch)
2010-09-01 02:20 EDT, Petya Sabeva CLA
no flags Details | Diff
Mark the first patch as invalid (27.00 KB, patch)
2010-09-01 02:21 EDT, Petya Sabeva CLA
no flags Details | Diff
Mapped superclass icon (864 bytes, image/jpeg)
2010-09-01 06:34 EDT, Stefan Dimov CLA
no flags Details
patch (37.04 KB, patch)
2010-09-01 09:12 EDT, Petya Sabeva CLA
no flags Details | Diff
patch (21.05 KB, patch)
2010-09-01 09:58 EDT, Petya Sabeva CLA
stefan.dimov: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dimov CLA 2010-08-12 07:59:25 EDT
Sometimes the user would want to create java entity from new or already existing mapped superclass. I believe it could elegantly implemented like this:

1. When the user drags and drops a mapped superclass from the project explorer into the diagram the mapped superclass should not appear in the diagram. Instead, a new java entity, which inherits this superclass, should be created and visualized in the diagram

2. In the palette on the left, in the section 'Entities' should appear a new item named: 'Inherited Entity' or something like that. When the user chooses this item a new mapped superclass and a new entity should be created and the entity should be visualized into the diagram.
Comment 1 Petya Sabeva CLA 2010-08-26 04:03:42 EDT
Created attachment 177502 [details]
patch

I am not sure about the feature name in the pallete. It should be discussed.
Comment 2 Stefan Dimov CLA 2010-08-31 10:33:55 EDT
The patch is not cpmaptible with the current HEAD version of the JPA editor. Perhaps, something is missing in the patch ...
Comment 3 Stefan Dimov CLA 2010-08-31 10:34:56 EDT
(In reply to comment #2)
> The patch is not cpmaptible with the current HEAD version of the JPA editor.
> Perhaps, something is missing in the patch ...

Sorry for the misspelling:
cpmaptible = compatible
Comment 4 Petya Sabeva CLA 2010-09-01 02:20:53 EDT
Created attachment 177915 [details]
Patch is updated...
Comment 5 Petya Sabeva CLA 2010-09-01 02:21:39 EDT
Created attachment 177916 [details]
Mark the first patch as invalid
Comment 6 Stefan Dimov CLA 2010-09-01 06:32:21 EDT
I have four notes:

1. If the (already existing) mapped superclass is in another package the new entity (created with drag-and-drop) has error because it's being created without necessary import clause.

2. If the mapped superclass has already an id it seems proper default to create the new entity without id. It will be inheritted from the superclass.

3. The new palette item should have a different icon than "Java Entity". Perhaps we should use the icon for the mapped superclass (see the attachment)

4. I'd prefer shorter text for the new palette item. Perhaps "Inheritted Entity" would be fine. (This one is my fault, because we should've discuss it earlier)
Comment 7 Stefan Dimov CLA 2010-09-01 06:34:20 EDT
Created attachment 177928 [details]
Mapped superclass icon
Comment 8 Petya Sabeva CLA 2010-09-01 09:12:26 EDT
Created attachment 177947 [details]
patch

This patch now implements the four notes mentioned in the previous comment.
Comment 9 Petya Sabeva CLA 2010-09-01 09:58:50 EDT
Created attachment 177953 [details]
patch

This patch is modified to be compatible with the version in the head.
Comment 10 Stefan Dimov CLA 2010-09-01 10:42:40 EDT
Patch committed