Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Custom builder to alter .class files(Custom builder to alter .class files)
icon5.gif  Custom builder to alter .class files [message #635302] Tue, 26 October 2010 10:53 Go to next message
Eclipse UserFriend
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?
Re: Custom builder to alter .class files [message #636418 is a reply to message #635302] Mon, 01 November 2010 07:35 Go to previous message
Eclipse UserFriend
To summarize, the problem is with incremental builder. It is not invoked on resource (*.java) save , unless "After a clean" is also selected. Any thoughts on this?
Previous Topic:Invalid project paths?
Next Topic:Could not find xxx.apk!
Goto Forum:
  


Current Time: Tue Apr 23 08:09:26 GMT 2024

Powered by FUDForum. Page generated in 0.02900 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top