mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 10:45:37 +02:00
bug 337257: Make target: Files in referenced projects are not saved
Patch from Axel Mueller
This commit is contained in:
parent
73a58b60cc
commit
54a25cca18
1 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.make.ui;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.make.core.IMakeTarget;
|
import org.eclipse.cdt.make.core.IMakeTarget;
|
||||||
|
@ -62,6 +63,12 @@ public class TargetBuild {
|
||||||
for (int i = 0; i < targets.length; ++i) {
|
for (int i = 0; i < targets.length; ++i) {
|
||||||
IMakeTarget target = targets[i];
|
IMakeTarget target = targets[i];
|
||||||
projects.add(target.getProject());
|
projects.add(target.getProject());
|
||||||
|
// Ensure we correctly save files in all referenced projects before build
|
||||||
|
try {
|
||||||
|
projects.addAll(Arrays.asList(target.getProject().getReferencedProjects()));
|
||||||
|
} catch (CoreException e) {
|
||||||
|
// Project not accessible or not open
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
|
|
Loading…
Add table
Reference in a new issue