JBoss development,
A new message was posted in the thread "create/extend a builder for hbm
files?":
http://community.jboss.org/message/532387#532387
Author : Denis Golovin
Profile :
http://community.jboss.org/people/dgolovin
Message:
--------------------------------------------------------------
To make it incremental you have to inject changed files from eclipse. Just define ant
property like it shown below.
http://community.jboss.org/servlet/JiveServlet/showImage/2346/ant-inject-...
build_files variable returns the set of absolute file system paths whose modification
caused the current build. A list of the characters, 'a' (added), 'c'
(changed), 'r' (removed), 'f' (files only), 'd' (directories
only), can be supplied as an argument to limit the file list to just those types of
deltas. Defaults to all deltas.
My might be needed to define several other variables like where to copy changed files and
etc.
It is not easy, but can be done.
If you change three files and then press Save all you'll get those three files
injected in build through ${changes} ant property and build will be called once. If you
save them on by one -> builder will be called tree times. But you can control it a
little with "Targets" tab and configure it to be called only once for manual
build for example, but in this case you'll get only one changed resource and that will
be project folder.
It could be a problem to change actual files because it could trigger ant script builder
twice. First after your change files. Then after ant builder finished and modified actual
sources get refreshed as it configured on Refresh tab.
So it could work this way.
1. Your build iterate through ${changes} using <for> and check that changed files if
they should be altered with missing attributes. If there is nothing to add it just should
skip the file.
2. Add the ant builder to builders list and inject all required params
When you change something it will trigger the builder with list of changed files and then
required attributes should be added to sources in project.
Then "Refresh" happens and it triggers builder again, but it does nothing
because required attributes already present.
Then it is in waitig state for next changes.
Second option for you is developing plug-in with Incremental builder like it described
here
http://www.eclipse.org/articles/Article-Builders/builders.html. I remember there is
an template in eclipse SDK which does most of the work left for you only actual
implementation of several methods.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/532387#532387