Bug 209489 - [Refactoring] Participate in Java type level refactorings
Summary: [Refactoring] Participate in Java type level refactorings
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard: EaseOfUse
Keywords: noteworthy, plan
: 250795 272188 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-12 09:02 EST by Tom Mutdosch CLA
Modified: 2010-10-29 16:04 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Mutdosch CLA 2007-11-12 09:02:29 EST
1. Create a JPA entity (and to synchronize with classes in persistence.xml during creation).
2. From Project Explorer, right-click on the entity and select refactor/move.  Select a new package.
3. Upon completion, you'll see errors in the Problems view:
"Class "com.ENTITYNAME" cannot be resolved" in persistence.xml
The location of the classes in persistence.xml were not updated during refactoring. 

It would be nice if Dali could hook into the JDT refactoring framework - since the persistence.xml is already modeled, it should be pretty easy to update during refactoring.
Comment 1 Neil Hauge CLA 2007-11-12 17:43:18 EST
I agree that this would be a nice feature enhancement.  In this case, a nice workaround is to Synchronize Classes on the persistence.xml after refactoring, and this would update the class reference.
Comment 2 Neil Hauge CLA 2009-01-08 11:38:34 EST
*** Bug 250795 has been marked as a duplicate of this bug. ***
Comment 3 Neil Hauge CLA 2009-03-31 17:09:25 EDT
Ran out of time for this in 2.2.
Comment 4 Kevan Holdaway CLA 2010-03-12 10:53:10 EST
It appears you are already participating in the move refactor as the packages are updated.  It doesn't seem like it would be that difficult to participate in the delete refactor.
Comment 5 Neil Hauge CLA 2010-03-15 20:44:55 EDT
That would be part of the JDT refactoring as Dali does not yet participate in any refactoring operations.  We have wanted to add this functionality for a long time.  Targeting for the next release.
Comment 6 Karen Butzke CLA 2010-06-25 14:12:07 EDT
Dali needs to participate in the refactoring of java types by updating the persistence.xml and mapping files.

This bug will cover updating the persistence.xml and mapping files during the following refactorings:

Delete/Rename/Move Java class
Delete/Rename/Move Java package
Delete/Rename/Move Java source folder

See the wiki design doc:
http://wiki.eclipse.org/Dali_Project/FeatureDocs/DaliRefactoringParticipants
Comment 7 Neil Hauge CLA 2010-07-30 12:49:03 EDT
*** Bug 272188 has been marked as a duplicate of this bug. ***
Comment 8 Karen Butzke CLA 2010-08-10 15:22:17 EDT
fixed in M1