Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to always invoke a builder
How to always invoke a builder [message #645351] Thu, 16 December 2010 12:24
Michael R is currently offline Michael R
Messages: 1
Registered: December 2010
Junior Member
Hi,

In my plug-in I always want to run my builder when the user manually
requests a project build even when there have been no changes in the
project at all. I have to do this because the tool I call in my builder
itself does incremental builds. Basically I want to have the same
behaviour as the Eclipse CDT Make plug-in which always invokes make. I
now call forgetLastBuiltState() in my builder which actually works fine
when "build automatically" is switched off.

My problem is that when automatic build is activated, my builder gets
called endlessly. Here is some code to show you how my builder works:

build() {
try {
removeAllMarkers(project);
runExternalTool(args, monitor, project);
refreshProject(monitor, project);
} catch (Exception e) {
// error handling
} finally {
forgetLastBuiltState();
}

return null;
}

Do you know how I can accomplish that my builder is always called when
requested but without the issues mentioned when automatic build is
turned on? Could it be that the problem is that all three commands
(remove markers, run the tool which changes workspace resources, and
refresh) create resource change events which retrigger a build?

Thanks,
Michael
Previous Topic:[PDEBuild] Missing <buildDirectory>/features/org.eclipse.pde.build.container/build.xml
Next Topic:Incremental Builder
Goto Forum:
  


Current Time: Tue Jul 29 19:12:02 EDT 2014

Powered by FUDForum. Page generated in 0.05184 seconds