I believe this is not doable currently, but you are right it would be an interesting enhancement. Could I ask you to enter it in bugzilla, please?
In the meantime, you may try to configure the build script yourself, i.e. add a target that regenerates the Java files from the schema. I would be curious to see your addition to the build script - if it's generic enough, then it could be included in the IDE-generated script (build-impl.xml) by default.
On Feb 24, 2012, at 6:48 PM, peter belbin wrote:
When I have a project that uses external schema files, or, those files need to be editable using some other tooling, I tend to create a project, add a folder ‘schemas’ and put the schemas in there. I then create jaxb bindings, to allow me to create a project .jar product that is then available for use by multiple other projects. Ie: encapsulate the jaxb generated code into a jar producing project. What I notice is that if I do a change to the schemas/* files, that, a clean & build does not notice that the source files have changed, even though the ide remembers where the files came from (the ide, right click on the schema file under the jaxb bindings, and hit the ‘refresh’ option – it knows where they came from). Should not the build script, since it knows the files came from a local directory (ie: within the project) detect that the source files have changed, and automagically do the refresh? As it is, I have to do the refresh manually, and, I may forget to do it. Also, if the files are checked into cvs, I manually have to keep the files up to date since I may not have noticed whether the files got updated. Now, I understand that there may be situations where the current behavior is preferred, because you could want to work upon a set of schema changes before actually having the schema get used. If there was a configurable value on the project (or, perhaps, per binding) to indicate whether it should automatically perform updates based on the source being more recent than what it has in it’s cache, I imagine this would be the best scenario possible, so that users can control this behavior.