Skip to content

Commit

Permalink
Run builder on empty delta to react on when the active configuration
Browse files Browse the repository at this point in the history
changes.

Fix #197
  • Loading branch information
15knots committed Jan 2, 2024
1 parent 1c93219 commit 62d9640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions de.marw.cmake4eclipse.mbs/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
name="Cmake4eclipse buildscript generator"
point="org.eclipse.core.resources.builders">
<builder
callOnEmptyDelta="true"
hasNature="true">
<run
class="org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
Expand Down Expand Up @@ -60,7 +61,8 @@ private void addBuilders(IProgressMonitor monitor) throws CoreException {

ICommand bldrCommand = description.newCommand();
bldrCommand.setBuilderName(Activator.BUILDER_ID);
// bldrCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
// do not run on each resource delta change..
bldrCommand.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD, false);

List<ICommand> commands = new ArrayList<>(Arrays.asList(description.getBuildSpec()));
commands.add(0, bldrCommand);
Expand Down

0 comments on commit 62d9640

Please sign in to comment.