1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

bug 306708: IScannerInfoConsoleParser.startup is call multiple times even if nothing needs to be compiled

Made ScannerConfigBuilder run only on FULL_BUILD event and configurable in properties.
This commit is contained in:
Andrew Gvozdev 2010-03-23 02:59:42 +00:00
parent 0a634c54fe
commit 61da6659ce
2 changed files with 9 additions and 1 deletions

View file

@ -475,7 +475,9 @@
name="%epScannerConfigBuilder.name"
point="org.eclipse.core.resources.builders">
<builder
hasNature="true">
callOnEmptyDelta="true"
hasNature="true"
isConfigurable="true">
<run
class="org.eclipse.cdt.build.core.scannerconfig.ScannerConfigBuilder">
</run>

View file

@ -15,6 +15,7 @@ import org.eclipse.core.resources.ICommand;
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;
/**
@ -41,6 +42,11 @@ public class ScannerConfigNature implements IProjectNature {
}
ICommand command = description.newCommand();
command.setBuilderName(ScannerConfigBuilder.BUILDER_ID);
command.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
command.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
command.setBuilding(IncrementalProjectBuilder.FULL_BUILD, true);
command.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD, false);
ICommand[] newCommands = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, newCommands, 0, commands.length);
newCommands[commands.length] = command;