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

Bug 322567

Summary: JAXB schema generation should open the generated schema
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JAXBAssignee: Tran Le <tranle1>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: 3.0Keywords: plan
Target Milestone: 3.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard: EaseOfUse fix_ready
Attachments:
Description Flags
Proposed patch 1 none

Description Karen Butzke CLA 2010-08-12 13:45:03 EDT
After generating a schema from classes using JAXB we should open the schema in the editor.
Comment 1 Neil Hauge CLA 2010-08-19 17:11:49 EDT
This might be tricky due to the nature of schema generation (done via external process).  Would probably require a resource listener of some sort, and might be hard to tell when a schema has just been generated vs imported via some other mechanism.
Comment 2 Karen Butzke CLA 2010-08-19 17:20:18 EDT
In o.e.jpt.jaxb.core.internal.SchemaGenerator.postGenerate() we do the refresh of the project. Couldn't we open the generated schema there? Or are we just getting lucky that the external process is completed when we get to that postGenerate and do the refresh?
Comment 3 Neil Hauge CLA 2010-08-19 17:25:09 EDT
Yep...That would work.  Looks like we already solved that problem with a post launch listener that tells us when the process has finished.  Didn't think of that.
Comment 4 Tran Le CLA 2010-09-23 17:14:31 EDT
jpt.jaxb.core.internal.SchemaGenerator.postGenerate() is a core method, and we will need to invoke the UI to open an editor.
Comment 5 Neil Hauge CLA 2012-03-21 12:29:37 EDT
Will need to do something similar to EclipseLink Dynamic Entity Gen.
Comment 6 Tran Le CLA 2012-04-11 18:54:45 EDT
Fixed in M7
Comment 7 Jolene Moffitt CLA 2012-05-09 13:29:46 EDT
While verifing in build I-3.4.0-20120507135259, If I create a JAXB Project, some classes and then generate a JAXB schema from classes I get a dialog with the following error – Windows cannot find ‘…\Workspace\JAXBProject\NewXMLSchema.xsd’  Make sure you typed the name correctly, and then try again.  
 
The file does exist in that directory and is created in the project.  I just have to click on OK for the error dialog and then double click on the NewXMLSchema.xsd file to open it in the editor.
Comment 8 Karen Butzke CLA 2012-05-09 16:04:46 EDT
updating the target since this is not fixed in M7
Comment 9 Tran Le CLA 2012-05-11 11:03:04 EDT
Created attachment 215483 [details]
Proposed patch 1
Comment 10 Tran Le CLA 2012-05-16 17:36:48 EDT
Delaying the open schema functionality for this release; retargeting to 3.3
Comment 11 Tran Le CLA 2012-07-16 14:36:15 EDT
Fixed in 3.3 M1
Comment 12 Jolene Moffitt CLA 2012-10-05 12:05:22 EDT
Verified in build I-3.5.0-20121003040013 that when you generate a schema from JAXB classes the schema.xml is created and opened in the editor.  To see verification steps - http://wiki.eclipse.org/Dali_3.3_M2_Release