[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Re: IncrementalProjectBuilder vs. IResourceChangeEvent
|
"François" <francois.malouin@xxxxxxxxxx> wrote in message
news:f3k9o2$e0v$1@xxxxxxxxxxxxxxxxxxxx
> Hello all, just a quick question :)
>
> Is there a reason I should use the builders mecanism instead of the plain
> old event driven way?
Builders are more deterministic: you know when they're going to run. My
personal rule of thumb now is that resource change listeners are great for
doing things like updating views, or perhaps reporting errors as in your
case, but lousy for anything that generates further artifacts. If you must
use a resource change listener, make sure it's very smart about not doing
unnecessary work, e.g., don't modify files just to update a timestamp.
At my company we've had tremendous headaches with things like endless build
loops caused when a builder generates a file, that triggers a resource
change listener, that produces a new file, that triggers a build, etc.