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

Bug 346989

Summary: *.xjb files should be recognized as XML
Product: [WebTools] Dali JPA Tools Reporter: Daniel Serodio <eclipse.dserodio>
Component: JAXBAssignee: Neil Hauge <neil.hauge>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: karenfbutzke, neil.hauge, paul.fullbright, thatnitind
Version: unspecified   
Target Milestone: 3.3   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
patch none

Description Daniel Serodio CLA 2011-05-24 10:19:51 EDT
.xjb is the recommended file extension for JAXB Bindings customizations, Eclipse should recognize these as XML files out of the box.

-- Configuration Details --
Product: SpringSource Tool Suite 2.6.1.201105041000-RELEASE (com.springsource.sts.ide)
Installed Features:
 org.eclipse.wst.xml_ui.feature 3.2.3.v201102160550-7H7AFUWDxumQJOi9ghcTb5YgkwEZ
Comment 1 Paul Fullbright CLA 2011-05-25 14:13:59 EDT
Is the problem that Dali doesn't recognize these file types as JAXB bindings customization files, or that eclipse doesn't recognize .xjb files as xml extensions?
Comment 2 Daniel Serodio CLA 2011-05-25 16:44:40 EDT
I'm not sure I understand your question. How can I check if Dali recognizes these files as JAXB bindings customizations?
Comment 3 Paul Fullbright CLA 2011-05-25 16:53:55 EDT
What is the exact nature of the problem?  Does the problem happen when attempting to edit .xjb files?  That is - does the xml editor recognize them?  Or are you talking about more specific JAXB use cases?
Comment 4 Nitin Dahyabhai CLA 2011-05-25 16:54:40 EDT
Maybe you could elaborate on how you found out that they're not already treated as XML files?  And attach an example?
Comment 5 Daniel Serodio CLA 2011-05-25 17:02:33 EDT
I expected that when I double-clicked a .xjb file, it would open in the XML Editor, but it opens in the plain Text Editor.

Also, I checked Eclipse's XML Catalog and didn't find any entry for the http://java.sun.com/xml/ns/jaxb namespace.
Comment 6 Paul Fullbright CLA 2011-05-25 17:14:07 EDT
I see what you are talking about now.

Nitin, is this something that should go in WTP proper, seeing as I believe some packages do not pick up Dali functionality?

I think the JAXB schema should likely go in jst common schemas.  Not sure about the .xjb content type.
Comment 7 Nitin Dahyabhai CLA 2011-05-25 17:22:47 EDT
An example would be good.

(In reply to comment #6)
> I see what you are talking about now.
> 
> Nitin, is this something that should go in WTP proper, seeing as I believe some
> packages do not pick up Dali functionality?

Would those packages be working with this file type, though?  I would expect the formal association/content-type to come from Dali, but even then the XML header at the beginning of the file should cause it to be treated as XML by the platform.
Comment 8 Paul Fullbright CLA 2011-05-25 17:35:34 EDT
It depends.

We don't have any functionality that deals directly with this file type.  I see that wst.xml has basic support for wsdl file types, even though there is a wsdl plugin.  And I believe one of the reasons that some packages don't pick up Dali JAXB is that they have their own JAXB functionality.

So, I guess I really am asking you.  :)
Comment 9 Paul Fullbright CLA 2011-05-25 17:37:09 EDT
We don't need a full-fledged .xjb content type, just to associate it with the xml content type.
Comment 10 Neil Hauge CLA 2011-06-09 09:21:04 EDT
So do we have a verdict here?  If not, let's just define this in Dali for now and open a bug to move it to WTP proper.  I don't want this to just sit in limbo.
Comment 11 Paul Fullbright CLA 2012-03-08 11:18:58 EST
Committed .xjb file association (with .xml content type) for M6.

Waiting to see if we can still get JAXB bindings schema in.
Comment 12 Neil Hauge CLA 2012-03-19 17:41:21 EDT
I'll see if I can get the schema approved in time.
Comment 13 Neil Hauge CLA 2012-04-25 18:12:15 EDT
(In reply to comment #12)
> I'll see if I can get the schema approved in time.

This isn't going to happen.  Deferring to next release.
Comment 14 Paul Fullbright CLA 2012-04-26 09:34:53 EDT
Created attachment 214602 [details]
patch

Here's a patch for when we're ready.
Comment 15 Neil Hauge CLA 2012-08-23 18:04:50 EDT
IP request has been approved.  http://dev.eclipse.org/ipzilla/show_bug.cgi?id=6427
Comment 16 Paul Fullbright CLA 2012-08-24 12:04:35 EDT
Added for M2.

But also logged a bug against WTP to move the schema to jst standard schemas.

Bug 388007