| Summary: | [Metadata Conversion] Support moving JPA global metadata to XML | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Nan Li <nan.n.li> | ||||||||||||||
| Component: | JPA | Assignee: | Nan Li <nan.n.li> | ||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||
| Severity: | enhancement | ||||||||||||||||
| Priority: | P3 | CC: | brian.vosburgh, karenfbutzke, neil.hauge | ||||||||||||||
| Version: | unspecified | Keywords: | plan | ||||||||||||||
| Target Milestone: | 3.2 M6 | Flags: | brian.vosburgh:
review+
|
||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Windows 7 | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Bug Depends on: | |||||||||||||||||
| Bug Blocks: | 138622 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Nan Li
Created attachment 203192 [details]
patch
This patch is not ready for check-in due to the fix of the NPE happening when removing nested annotation is a bit hacky. Brain is looking at the related issues to find a better way to fix that problem, but I still upload the patch anyway to let Neil and Brain test and take a look at my code and give me some feedback.
Feedback on patch: ( ... -> ... indicates a suggested text change) - Would be nice if "Move to XML..." was at the end of the JPA Tools menu, as opposed to being first. - [Warning]: Malformed metadata will cause disfunctional mapping file XML -> [Warning]: Malformed annotations will result in non-functional XML mapping file. - And duplicated or overridden JPA global metadata will not be moved to XML. -> Duplicated or overridden annotations will not be moved to XML. - It's interesting that the java file format isn't restored after removing annotations. This isn't a big deal, but something to look into. Other than that, it seems to be working nicely and as expected. Created attachment 203368 [details] patch Incorporated the comments. - Would be nice if "Move to XML..." was at the end of the JPA Tools menu, as opposed to being first. I couldn't find a way to do this. One comment in bug 324161 says ------------ > The confusion arises from the fact that other items in the same logical group > are added using actionSets, and actionSets are processed after > menuContributions - I think this is wrong (and should probably be fixed along > with bug 324160 ?) No, this is by design. actionSets (all action extension points) are applied after programmatic contributions and menuContributions. ----------- The menu items I added are menu contributes while the previous ones are objectContributions/actions, so we may need to leave "Move to XML" as it is. Let me know if I misunderstand this. - It's interesting that the java file format isn't restored after removing annotations. This isn't a big deal, but something to look into. I couldn't reproduce this. Let me know if you see it again. Thanks! Created attachment 203857 [details]
patch
Changed to perform JPA metadata conversion operation through ProgressMonitorDialog instead of WorkspaceJob.
This enhancement is being re-targeted to M3 as there was an underlying concurrency issue that was causing some problems. This should be resolved soon and this enhancement can then go into Head after a final review. The concurrency issue mentioned in comment 5 has not yet been fully resolved, and the IP Log had to be submitted to get a review completed in time for a Nov 23rd release. As a result, this feature will unfortunately have to wait until 3.2. Created attachment 206786 [details]
Patch
incorporated with Brain's code
Created attachment 211442 [details]
proposed patch
incorporated with the latest head code
Created attachment 212259 [details]
proposed patch
Reviewed and checked into HEAD. |