Custom builder to alter .class files [message #635302] |
Tue, 26 October 2010 10:53 |
Eclipse User |
|
|
|
Hello,
I wrote a small java app that injects some stuff in .class files and wanted to set that app as a post-build step for a certain java project.
Things quickly became more complicated than they should be. After reading about "project builders and natures" I am still stuck.
My builder must handle both incremental (auto & manual) and full builds. For incremental, I managed to use the ${build_files} eclipse variable to pass changed .class files to my builder. The dissapointment was that after a clean, ${build_files} is empty! even though the entire project needs to be built. As I understand, this is because the build after a clean qualifies as a "full build". No problem, I thought. I can use 2 custom builders that invoke the same tool. One will handle incremental builds using ${build_files} and one will handle full builds using ${build_project}, with the tool traversing the project tree.
So I setup the incremental builder to trigger "During manual builds" and "During auto builds" and the full builder to trigger "After a Clean". The full builder is triggered as expected but the incremental won't trigger on resource save. If checking "After a Clean" in the incremental builder (which logically I shouldn't be required to do), it IS invoked on resource save; but then, eclipse gets stuck in a cycle of refresh - build, once every 8 seconds (measured).
Very annoyed by the fact that Eclipse integration of a simple tool takes way longer than writing the tool itself. Any advice?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02900 seconds