JAXB mapped type detection

I have an XSD file in a resource directory that includes complex element types that happen to have the same name as several classes in my src directory.  The project is a pure Java project with no WebServices or other facets.  On my classes that have the same names as the XSD element types there is a "JAXB mapped type" icon to the left of the class name, clicking it takes me to the XSD element.  Right-clicking the icon gives me no options and I can't figure out how to remove the "mapped type" association from the class (without renaming it I suppose).

Additionally, an inspection complains that JAXB mapped types must have a default public no args constructor to be valid.  I can disable this inspection easily enough, but I am not sure why it is happening in the first place.  Does IntelliJ 8.1.3 automatically look through any schemas that exist in the project directory and assume classes that have the same name as any of the types are JAXB mapped classes?  Is there a way to make this conditional?  If I do happen to use JAXB to make a WS I would like to have the inspections tell me when something is wrong and I'm sure I will forget that I have turned this inspection off shortly...

I could remove the schemas from the project (or at least from the module -- currently there is only one), but would prefer to leave them in the documentation directory (I could exclude the documentation, but then it would not be visible in the project view).

Ideally I would like to just tell IntelliJ to not map these classes using JAXB, but I can't figure out where to do that.  Any help would be appreciated.


Please sign in to leave a comment.