Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-03-19 22:12:54 +0000
committerJeff Johnston2018-03-20 01:50:31 +0000
commit60affd8b9f98c07b0dac9176964250b67029ef70 (patch)
treea9784d0471f8e2505649d052b845785a1dec0fad /launch/org.eclipse.cdt.docker.launcher
parentf388f97fffe39ad21fbc39c6441cb66dda40328a (diff)
downloadorg.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.tar.gz
org.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.tar.xz
org.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.zip
Bug 532420 - Make Container Core Build indexing more efficient
- add new ICBuildConfiguration2 to keep API checks happy - remove refreshScannerInfo method from ICBuildConfiguration and put it in ICBuildConfiguration2 - make CBuildConfiguration implement ICBuildConfiguration2 - update ContainerPropertyVolumesModel to use new Docker plug-ins using docker-client 8.9.2. - fix MesonBuildConfiguration to use a job for each compile line being processed, then wait until all jobs are done before causing an reindex to occur (this will maximize parallelism when building in Containers) - fix ContainerCommandLauncherFactory to save the project so we can exclude project directories when copying header files using the new Docker Tooling interfaces - fix CoreBuildLaunchBarTracker to use ICBuildConfiguration2 interface to make the call to refreshScannerInfo Change-Id: I2138f5111614e7821e46c22731397a01035eac0a
Diffstat (limited to 'launch/org.eclipse.cdt.docker.launcher')
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java18
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java2
2 files changed, 16 insertions, 4 deletions
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
index 369460f1588..0d2d472eef8 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java
@@ -41,8 +41,11 @@ import org.eclipse.linuxtools.docker.ui.launch.ContainerLauncher;
public class ContainerCommandLauncherFactory
implements ICommandLauncherFactory, ICommandLauncherFactory2 {
+ private IProject project;
+
@Override
public ICommandLauncher getCommandLauncher(IProject project) {
+ this.project = project;
// check if container build enablement has been checked
ICConfigurationDescription cfgd = CoreModel.getDefault()
.getProjectDescription(project)
@@ -80,6 +83,7 @@ public class ContainerCommandLauncherFactory
if (cfg == null) {
return null;
}
+ this.project = (IProject) cfg.getManagedProject().getOwner();
IOptionalBuildProperties props = cfg.getOptionalBuildProperties();
if (props != null) {
String enablementProperty = props.getProperty(
@@ -99,6 +103,11 @@ public class ContainerCommandLauncherFactory
@Override
public ICommandLauncher getCommandLauncher(ICBuildConfiguration cfgd) {
+ try {
+ this.project = cfgd.getBuildConfiguration().getProject();
+ } catch (CoreException e1) {
+ return null;
+ }
// check if container linux os is set
IToolChain toolchain;
try {
@@ -201,10 +210,12 @@ public class ContainerCommandLauncherFactory
return;
}
IPath hostDir = pluginPath;
+ List<String> excludeList = new ArrayList<>();
+ excludeList.add(project.getLocation().toString());
@SuppressWarnings("unused")
int status = launcher.fetchContainerDirs(connectionName,
imageName,
- paths, hostDir);
+ paths, excludeList, hostDir);
}
}
}
@@ -294,8 +305,11 @@ public class ContainerCommandLauncherFactory
return includePaths;
}
IPath hostDir = pluginPath;
+ // exclude project directories from any copying operation
+ List<String> excludeList = new ArrayList<>();
+ excludeList.add(project.getLocation().toString());
int status = launcher.fetchContainerDirsSync(connectionName,
- imageName, includePaths, hostDir);
+ imageName, includePaths, excludeList, hostDir);
if (status == 0) {
Set<String> copiedVolumes = launcher
.getCopiedVolumes(connectionName, imageName);
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
index ae828a9fd0b..c773a3204c0 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java
@@ -383,8 +383,6 @@ public class ContainerGCCToolChain extends PlatformObject implements IToolChain
return null;
}
- // process.waitFor();
-
// Scan for the scanner info
Map<String, String> symbols = new HashMap<>();
List<String> includePath = new ArrayList<>();

Back to the top