Skip to main content

Enhancing XJC listener

3 replies [Last post]
kirillcool
Offline
Joined: 2004-11-17

I would like to retrieve the following information from XjcListener interface:

I need to know what Java construct (member, methods, class) is generated from what XSD artifact. This will allow IDE that uses JAXB 2.0 to provide hyperlinks between XSD artifacts and the generated code - to show the end user what was generated from what.

The callback function must provide Locator (exactly as returned from xsom) and information on Java construct that will include Java filename, line number and construct kind (member to store attribute, member to store sequence element, methods for get and set, class for complex type etc.)

This functionality will allow changing the resulting Java code and not breaking the IDE, effectively decoupling them and not making IDE take hard-coded decisions.

Kirill

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohsuke
Offline
Joined: 2003-06-09

Most of the information is available as Outline and Model. Outline maps which Java program element maps to which model component. Aleksei separately requested that model components should have a reference back to XSOM objects.

So together I believe they will meet your request. I can add a callback to notify a listener of a model and an outline.

kirillcool
Offline
Joined: 2004-11-17

Excellent. I'll look into the Javadocs for them. Please add the callback.

kohsuke
Offline
Joined: 2003-06-09

done.