Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2013-03-10 00:54:33 +0000
committerAndrew Gvozdev2013-03-10 11:45:54 +0000
commit2bccd664165de845640fe615a7c5b1f0b87995e9 (patch)
tree6a2005d8f5b2422cf561773ba0352325683b2346 /build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder
parent6190dce23278d3599f668d52120c6a3281f6d511 (diff)
downloadorg.eclipse.cdt-2bccd664165de845640fe615a7c5b1f0b87995e9.tar.gz
org.eclipse.cdt-2bccd664165de845640fe615a7c5b1f0b87995e9.tar.xz
org.eclipse.cdt-2bccd664165de845640fe615a7c5b1f0b87995e9.zip
bug 357442: Contribute $CYGWIN_HOME by GnuCygwinConfigurationEnvironmentSupplier only if it does not come from preferences
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/GnuCygwinConfigurationEnvironmentSupplier.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/GnuCygwinConfigurationEnvironmentSupplier.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/GnuCygwinConfigurationEnvironmentSupplier.java
index 5b659ead2d2..53fb50609b4 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/GnuCygwinConfigurationEnvironmentSupplier.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/cygwin/GnuCygwinConfigurationEnvironmentSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 Intel Corporation and others.
+ * Copyright (c) 2005, 2013 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
/**
@@ -50,16 +49,15 @@ public class GnuCygwinConfigurationEnvironmentSupplier implements IConfiguration
return new BuildEnvVar(ENV_PATH, path, IBuildEnvironmentVariable.ENVVAR_PREPEND);
} else if (variableName.equals(Cygwin.ENV_CYGWIN_HOME)) {
- String home = Cygwin.getCygwinHome();
- // If the variable is not defined still show it in the environment variables list as a hint to user
- if (home == null) {
- home = ""; //$NON-NLS-1$
- }
- IPath homePath = new Path(home);
IEnvironmentVariable varCygwinHome = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariable(Cygwin.ENV_CYGWIN_HOME, null, false);
- if (varCygwinHome == null || (!homePath.equals(new Path(varCygwinHome.getValue())))) {
+ if (varCygwinHome == null) {
// Contribute if the variable does not already come from workspace environment
- return new BuildEnvVar(Cygwin.ENV_CYGWIN_HOME, homePath.toOSString());
+ String home = Cygwin.getCygwinHome();
+ if (home == null) {
+ // If the variable is not defined still show it in the environment variables list as a hint to user
+ home = ""; //$NON-NLS-1$
+ }
+ return new BuildEnvVar(Cygwin.ENV_CYGWIN_HOME, new Path(home).toOSString());
}
return null;

Back to the top