Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorJeff Johnston2018-07-12 13:53:05 -0400
committerJeff Johnston2018-07-12 13:53:05 -0400
commit1a8f399b8b82c5dd11bdaa170d7b26dc06c32bfb (patch)
tree4510fdaaddecf3ca7077437e1fabe05cf3c24301 /launch
parenta394557c601bdfe860e002f43b83eb492cda39e1 (diff)
downloadorg.eclipse.cdt-1a8f399b8b82c5dd11bdaa170d7b26dc06c32bfb.tar.gz
org.eclipse.cdt-1a8f399b8b82c5dd11bdaa170d7b26dc06c32bfb.tar.xz
org.eclipse.cdt-1a8f399b8b82c5dd11bdaa170d7b26dc06c32bfb.zip
Bug 536884 - Removing header cache should cause ScannerInfo refresh
- add a new IToolChain property "cdt.needScannerRefresh" that is set if scanner info needs to be refreshed - for a Container build, turn the property on in ContainerGCCToolChain startBuildProcess() if the Container headers for the toolchain's have been deleted - in CBuildConfiguration processLine(), look for the toolchain property when looking to see if scannerinfo should be calculated - in CBuildConfiguration, turn the toolchain property off in shutdown() Change-Id: I67a3537d1e2967dc15b66a1c37abda1ae8f78bff
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/docker/launcher/ContainerCommandLauncherFactory.java9
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChain.java9
2 files changed, 16 insertions, 2 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 1d3e4b3e1a..596482cb26 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,6 +41,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.linuxtools.docker.ui.launch.ContainerLauncher;
+@SuppressWarnings("restriction")
public class ContainerCommandLauncherFactory
implements ICommandLauncherFactory, ICommandLauncherFactory2 {
@@ -349,8 +350,12 @@ public class ContainerCommandLauncherFactory
}
} else {
- // TODO: fix this logic in future so it can be done using a call
- // rather than using a property of the toolchain
+ // Bug 536884 - if no include entries, check if the copied
+ // header files have been erased by the end-user in which
+ // case mark that scanner info needs refreshing (only way
+ // the headers will be recopied)
+ // TODO: fix this in a minor release to be an additional method
+ // that can be registered by the removal of the header files
IPath pluginPath = Platform
.getStateLocation(Platform
.getBundle(DockerLaunchUIPlugin.PLUGIN_ID))
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 9fce12031f..5104f9b9a7 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
@@ -20,6 +20,7 @@ import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -641,6 +642,14 @@ public class ContainerGCCToolChain extends PlatformObject
ICommandLauncher launcher = CommandLauncherManager.getInstance()
.getCommandLauncher(config);
+ // Bug 536884 - following is a kludge to allow us to check if the
+ // Container headers have been deleted by the user in which case
+ // we need to re-perform scanner info collection and copy headers
+ // to the host.
+ // TODO: make this cleaner
+ CommandLauncherManager.getInstance().processIncludePaths(config,
+ Collections.emptyList());
+
launcher.setProject(config.getBuildConfiguration().getProject());
if (launcher instanceof ICBuildCommandLauncher) {
((ICBuildCommandLauncher) launcher).setBuildConfiguration(config);

Back to the top