Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Project builder problem with touch()
Project builder problem with touch() [message #332336] Mon, 20 October 2008 05:49 Go to next message
Kingston Duffie is currently offline Kingston DuffieFriend
Messages: 7
Registered: July 2009
Junior Member
I am writing my own project builder. In order to deal with dependencies
between projects, my builder is returning a list of projects it is
interested in. This all works just fine for the normal cases. When there
is a change to a file in one of those projects, the builder for my project
gets invoked as expected.

Consider project1 and project2. Both have the same builder associated
with them. The builder on project1 has returned project2 in a previous
call to build(). If you make a change to a file in project2, then the
builder is invoked for project1.

But, if while the builder for project2 is working it calls touch() on one
of the files in project2, then project1's builder is not called to give it
a chance to react. Instead of touch(), I've also just tried creating a
new file or deleting one as part of project2's builder. Nothing that I
change while project2's builder is running will result in project1's
builder being invoked.

Perhaps I'm doing something wrong? (This is all on top of an RCP built on
top of Eclipse 3.3.2.)
Re: Project builder problem with touch() [message #332381 is a reply to message #332336] Mon, 20 October 2008 19:02 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
I hope someone corrects me if I am wrong but I believe this is by design.
Resource changes that occur during invocations of builders do not trigger
other builders.

Another example is detailed in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=58649

HTH
Darins
http://runnerwhocodes.blogspot.com

"Kingston Duffie" <kduffie@fnfr.com> wrote in message
news:3676c67b1cd618b21955e41cdf6558f8$1@www.eclipse.org...
>I am writing my own project builder. In order to deal with dependencies
>between projects, my builder is returning a list of projects it is
>interested in. This all works just fine for the normal cases. When there
>is a change to a file in one of those projects, the builder for my project
>gets invoked as expected.
>
> Consider project1 and project2. Both have the same builder associated
> with them. The builder on project1 has returned project2 in a previous
> call to build(). If you make a change to a file in project2, then the
> builder is invoked for project1.
>
> But, if while the builder for project2 is working it calls touch() on one
> of the files in project2, then project1's builder is not called to give it
> a chance to react. Instead of touch(), I've also just tried creating a
> new file or deleting one as part of project2's builder. Nothing that I
> change while project2's builder is running will result in project1's
> builder being invoked.
>
> Perhaps I'm doing something wrong? (This is all on top of an RCP built on
> top of Eclipse 3.3.2.)
>
Re: Project builder problem with touch() [message #332411 is a reply to message #332381] Tue, 21 October 2008 06:36 Go to previous message
Kingston Duffie is currently offline Kingston DuffieFriend
Messages: 7
Registered: July 2009
Junior Member
Thanks for pointing this out. The bug report was very interesting to
read. But the bottom line was that you are right that Eclipse will not
retrigger a builder based on resource changes made during a build. Seems
like I'm not the only one with this problem, so I hope they address it
sometime.

In the meantime, I realized that I can finesse this by pushing my "touch"
into a job that I schedule to run later -- and, therefore, outside the
build context. So this does the trick on getting my other builder to run
as I wanted. I hope this trick may prove useful for others in a similar
position.
Previous Topic:How to strip off all unreferenced ComplexTypes from WSDL?
Next Topic:Close projects not in working set
Goto Forum:
  


Current Time: Wed Jul 17 21:41:46 GMT 2024

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

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

Back to the top