Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorChris Recoskie2008-04-04 17:48:27 +0000
committerChris Recoskie2008-04-04 17:48:27 +0000
commit504602213a5ed701fc2fb8ebf31bfa7def5a563b (patch)
tree3abcc3cf5944c57b76af5542fa9dbb30acf210db /build
parentaf3f69afb9ed7804041fdb5d405c411ac22cfd4e (diff)
downloadorg.eclipse.cdt-504602213a5ed701fc2fb8ebf31bfa7def5a563b.tar.gz
org.eclipse.cdt-504602213a5ed701fc2fb8ebf31bfa7def5a563b.tar.xz
org.eclipse.cdt-504602213a5ed701fc2fb8ebf31bfa7def5a563b.zip
Various changes for EFS
- Fixed many NPEs in the build system that occurred when IProject.getLocation() returned null - Created new IStorage implementation (EFSFileStorage) for the editor which can handle EFS resources - added some utility methods for handling EFS resources
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java7
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java5
3 files changed, 16 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
index 3c207f1241e..0ef20d28b24 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
@@ -211,9 +211,13 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
protected String[] setEnvironment(CommandLauncher launcher, Properties initialEnv) {
// Set the environmennt, some scripts may need the CWD var to be set.
Properties props = initialEnv != null ? initialEnv : launcher.getEnvironment();
- props.put("CWD", fWorkingDirectory.toOSString()); //$NON-NLS-1$
- props.put("PWD", fWorkingDirectory.toOSString()); //$NON-NLS-1$
- // On POSIX (Linux, UNIX) systems reset LANG variable to English with UTF-8 encoding
+
+ if (fWorkingDirectory != null) {
+ props.put("CWD", fWorkingDirectory.toOSString()); //$NON-NLS-1$
+ props.put("PWD", fWorkingDirectory.toOSString()); //$NON-NLS-1$
+ }
+ // On POSIX (Linux, UNIX) systems reset LANG variable to English with
+ // UTF-8 encoding
// since GNU compilers can handle only UTF-8 characters. English language is chosen
// beacuse GNU compilers inconsistently handle different locales when generating
// output of the 'gcc -v' command. Include paths with locale characters will be
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
index b6d1b203c4b..883181ea7c4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
@@ -4071,8 +4071,11 @@ public class ManagedBuildManager extends AbstractCExtension {
}
} else {
buildDirectory = project.getLocation();
- if(builder.isManagedBuildOn())
- buildDirectory = buildDirectory.append(cfg.getName());
+
+ if (buildDirectory != null) {
+ if (builder.isManagedBuildOn())
+ buildDirectory = buildDirectory.append(cfg.getName());
+ }
}
return buildDirectory;
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
index 0b3ebd28e1e..e9bf86a1db7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/MbsEnvironmentSupplier.java
@@ -62,8 +62,11 @@ public class MbsEnvironmentSupplier implements IEnvironmentVariableSupplier {
//
// IPath projectLocation = owner.getLocation();
// IPath workingDirectory = projectLocation.append(topBuildDir);
-// String value = workingDirectory.toOSString();
+// String value = workingDirectory.toOSString();
+ if(topBuildDir != null) {
variable = new BuildEnvVar(name, topBuildDir.toOSString(), IBuildEnvironmentVariable.ENVVAR_REPLACE,null);
+ }
+
// }
}
}

Back to the top