mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +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:
parent
0a634c54fe
commit
61da6659ce
2 changed files with 9 additions and 1 deletions
|
@ -475,7 +475,9 @@
|
||||||
name="%epScannerConfigBuilder.name"
|
name="%epScannerConfigBuilder.name"
|
||||||
point="org.eclipse.core.resources.builders">
|
point="org.eclipse.core.resources.builders">
|
||||||
<builder
|
<builder
|
||||||
hasNature="true">
|
callOnEmptyDelta="true"
|
||||||
|
hasNature="true"
|
||||||
|
isConfigurable="true">
|
||||||
<run
|
<run
|
||||||
class="org.eclipse.cdt.build.core.scannerconfig.ScannerConfigBuilder">
|
class="org.eclipse.cdt.build.core.scannerconfig.ScannerConfigBuilder">
|
||||||
</run>
|
</run>
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.core.resources.ICommand;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
import org.eclipse.core.resources.IProjectNature;
|
import org.eclipse.core.resources.IProjectNature;
|
||||||
|
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,6 +42,11 @@ public class ScannerConfigNature implements IProjectNature {
|
||||||
}
|
}
|
||||||
ICommand command = description.newCommand();
|
ICommand command = description.newCommand();
|
||||||
command.setBuilderName(ScannerConfigBuilder.BUILDER_ID);
|
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];
|
ICommand[] newCommands = new ICommand[commands.length + 1];
|
||||||
System.arraycopy(commands, 0, newCommands, 0, commands.length);
|
System.arraycopy(commands, 0, newCommands, 0, commands.length);
|
||||||
newCommands[commands.length] = command;
|
newCommands[commands.length] = command;
|
||||||
|
|
Loading…
Add table
Reference in a new issue