mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
RESOLVED - bug 230161: "clean selected files" causes NullPointer exception
https://bugs.eclipse.org/bugs/show_bug.cgi?id=230161
This commit is contained in:
parent
bed0175101
commit
92de3f94c0
1 changed files with 35 additions and 32 deletions
|
@ -1633,13 +1633,17 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
|
|
||||||
IBuildResource buildResource = des.getBuildResource(file);
|
IBuildResource buildResource = des.getBuildResource(file);
|
||||||
|
|
||||||
|
|
||||||
|
if (buildResource != null) {
|
||||||
|
|
||||||
// step collector
|
// step collector
|
||||||
Set dependentSteps = new HashSet();
|
Set dependentSteps = new HashSet();
|
||||||
|
|
||||||
// get dependent IO types
|
// get dependent IO types
|
||||||
IBuildIOType depTypes[] = buildResource.getDependentIOTypes();
|
IBuildIOType depTypes[] = buildResource.getDependentIOTypes();
|
||||||
|
|
||||||
// iterate through each type and add the step the type belongs to to
|
// iterate through each type and add the step the type belongs
|
||||||
|
// to to
|
||||||
// the collector
|
// the collector
|
||||||
for (int j = 0; j < depTypes.length; j++) {
|
for (int j = 0; j < depTypes.length; j++) {
|
||||||
IBuildIOType type = depTypes[j];
|
IBuildIOType type = depTypes[j];
|
||||||
|
@ -1657,20 +1661,19 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
IBuildIOType[] outputIOTypes = step.getOutputIOTypes();
|
IBuildIOType[] outputIOTypes = step.getOutputIOTypes();
|
||||||
|
|
||||||
for (int j = 0; j < outputIOTypes.length; j++) {
|
for (int j = 0; j < outputIOTypes.length; j++) {
|
||||||
IBuildResource[] resources = outputIOTypes[j]
|
IBuildResource[] resources = outputIOTypes[j].getResources();
|
||||||
.getResources();
|
|
||||||
|
|
||||||
for (int i = 0; i < resources.length; i++) {
|
for (int i = 0; i < resources.length; i++) {
|
||||||
IResource outputFile = currentProject
|
IResource outputFile = currentProject.findMember(resources[i]
|
||||||
.findMember(resources[i].getFullPath().removeFirstSegments(1)); // strip project name
|
.getFullPath().removeFirstSegments(1)); // strip project name
|
||||||
|
|
||||||
if (outputFile != null)
|
if (outputFile != null)
|
||||||
outputFile.delete(true, new SubProgressMonitor(
|
outputFile.delete(true, new SubProgressMonitor(monitor, 1));
|
||||||
monitor, 1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
|
|
Loading…
Add table
Reference in a new issue