[JBoss Tools Development] New message: "Re: create/extend a builder for hbm files?"
by Denis Golovin
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
16 years
[JBoss AOP Development] New message: "ExtraClassPoolFactoryParameters"
by Flavia Rainone
JBoss development,
A new message was posted in the thread "ExtraClassPoolFactoryParameters":
http://community.jboss.org/message/532386#532386
Author : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
As part of https://jira.jboss.org/jira/browse/JBAOP-772 I've been cleaning up JBoss AOP code by removing any old classpool leftover that I can find.
During this process, I found this ExtraClassPoolFactoryParameter class. It has a warning in the javadoc telling that it should not be deleted:
/**
* This class is used by the AS5 integration. Do not delete!!!!
*
* @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
public class ExtraClassPoolFactoryParameters
But, taking a look at the way this class is being used, it looks like there is something missing, as this is all I can find:
public class VFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicyWithRegistry
{
...
public void registerClassLoader(Module module, ClassLoader loader)
{
//Need to pass some data through to the classpoolfactory here
Map<Object, Object> properties = new HashMap<Object, Object>();
//The module is needed by the JBoss5ClassPoolFactory, the legacy JBossClassPoolFactory will ignore this
properties.put(Module.class, module);
ExtraClassPoolFactoryParameters.pushThreadProperties(properties);
try
{
AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
}
finally
{
ExtraClassPoolFactoryParameters.popThreadProperties();
}
}
}
I can't find any calls to ExtraClassPoolFactoryParameters.peekThreadProperties. Is this class really being used? Where?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/532386#532386
16 years