mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
fixed builder
This commit is contained in:
parent
f1f4284c8c
commit
b223fdb790
2 changed files with 19 additions and 17 deletions
|
@ -23,3 +23,12 @@
|
|||
refernce core plugin and nature classes for ID.
|
||||
- removed unsed methods in model for adding/removing
|
||||
natures.
|
||||
|
||||
2002-10-15 David Inglis
|
||||
* src/../internal/core/CBuilder.java
|
||||
|
||||
Fixed builder to return referenced projects so that eclipse
|
||||
builder will build increamentaly build projects when they change.
|
||||
Handle "clean" target as special so the build state is cleared allowing
|
||||
the next increamental build to come in as a full build.
|
||||
|
|
@ -53,19 +53,16 @@ public class CBuilder extends ACBuilder {
|
|||
* @see IncrementalProjectBuilder#build
|
||||
*/
|
||||
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
|
||||
boolean isFullBuild= (kind == IncrementalProjectBuilder.FULL_BUILD);
|
||||
if (isFullBuild) {
|
||||
invokeMake(true, monitor);
|
||||
} else {
|
||||
/* Take the code in the QNX Builder todo project dependencies. */
|
||||
invokeMake(false, monitor);
|
||||
boolean isClean = invokeMake((kind == IncrementalProjectBuilder.FULL_BUILD), monitor);
|
||||
if ( isClean ) {
|
||||
forgetLastBuiltState();
|
||||
}
|
||||
forgetLastBuiltState();
|
||||
return null;
|
||||
return getProject().getReferencedProjects();
|
||||
}
|
||||
|
||||
|
||||
private void invokeMake(boolean fullBuild, IProgressMonitor monitor) {
|
||||
private boolean invokeMake(boolean fullBuild, IProgressMonitor monitor) {
|
||||
boolean isClean = false;
|
||||
IProject currProject= getProject();
|
||||
SubProgressMonitor subMonitor = null;
|
||||
|
||||
|
@ -78,15 +75,9 @@ public class CBuilder extends ACBuilder {
|
|||
CProjectNature nature= (CProjectNature)currProject.getNature(CProjectNature.C_NATURE_ID);
|
||||
IPath makepath= nature.getBuildCommand();
|
||||
if (!makepath.isEmpty()) {
|
||||
// clear console if requested
|
||||
IConsole console = CCorePlugin.getDefault().getConsole();
|
||||
console.start(currProject);
|
||||
/*
|
||||
if (BuildInfoFactory.create().isClearBuildConsole()
|
||||
&& MakeUtil.getSessionConsoleMode(currProject)) {
|
||||
console.clear();
|
||||
}
|
||||
*/
|
||||
|
||||
ConsoleOutputStream cos = console.getOutputStream();
|
||||
|
||||
// remove all markers for this project
|
||||
|
@ -94,7 +85,8 @@ public class CBuilder extends ACBuilder {
|
|||
|
||||
IPath workingDirectory= getWorkingDirectory();
|
||||
String[] userArgs= parseArguments(fullBuild, nature.getIncrBuildArguments());
|
||||
|
||||
if ( userArgs.length != 0 && userArgs[userArgs.length-1].equals("clean") )
|
||||
isClean = true;
|
||||
// Before launching give visual cues via the monitor
|
||||
subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
|
||||
subMonitor.subTask("Invoking Command: " + makepath.toString());
|
||||
|
@ -156,6 +148,7 @@ public class CBuilder extends ACBuilder {
|
|||
CCorePlugin.log(e);
|
||||
}
|
||||
monitor.done();
|
||||
return isClean;
|
||||
}
|
||||
|
||||
private String[] parseArguments(boolean fullBuild, String override_args) {
|
||||
|
|
Loading…
Add table
Reference in a new issue