Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 197133 Details for
Bug 338595
Remote project breaks existing non-remote project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
new patch
rdt-core_rdt-ui_newPatch.txt (text/plain), 5.62 KB, created by
John Liu
on 2011-06-01 14:29:00 EDT
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
John Liu
Created:
2011-06-01 14:29:00 EDT
Size:
5.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ptp.rdt.core >Index: src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.core/src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java,v >retrieving revision 1.19 >diff -u -r1.19 RemoteMakeBuilder.java >--- src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java 29 Apr 2011 18:02:32 -0000 1.19 >+++ src/org/eclipse/ptp/rdt/core/remotemake/RemoteMakeBuilder.java 1 Jun 2011 18:15:44 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2008, 2010 IBM Corporation and others. >+ * Copyright (c) 2008, 2011 IBM 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 >@@ -25,14 +25,12 @@ > import org.eclipse.cdt.core.ErrorParserManager; > import org.eclipse.cdt.core.envvar.IEnvironmentVariable; > import org.eclipse.cdt.core.model.ICModelMarker; >-import org.eclipse.cdt.core.model.ICProject; > import org.eclipse.cdt.core.resources.IConsole; > import org.eclipse.cdt.internal.core.ConsoleOutputSniffer; >-import org.eclipse.cdt.internal.core.model.CModelManager; >+import org.eclipse.cdt.internal.core.envvar.EnvironmentVariableManager; > import org.eclipse.cdt.make.core.IMakeBuilderInfo; > import org.eclipse.cdt.make.core.MakeBuilder; > import org.eclipse.cdt.make.core.MakeCorePlugin; >-import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2; > import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector; > import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2; > import org.eclipse.cdt.make.internal.core.MakeMessages; >@@ -47,6 +45,7 @@ > import org.eclipse.cdt.managedbuilder.core.IToolChain; > import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; > import org.eclipse.cdt.managedbuilder.internal.core.InputType; >+import org.eclipse.cdt.utils.envvar.StorableEnvironment; > import org.eclipse.core.resources.ICommand; > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.resources.IProject; >@@ -139,7 +138,34 @@ > > > public static final String REMOTE_MAKE_BUILDER_ID = "org.eclipse.ptp.rdt.core.remoteMakeBuilder"; //$NON-NLS-1$ >- >+ /** >+ * turn off append local environment variables to get environment variables without appending workspace scope environment variables. >+ * backup the append local environment variable after getting the variables. >+ * @param configuration >+ * @return >+ */ >+ private IEnvironmentVariable[] getEnVarWithoutWorkspaceVarAppend(IConfiguration configuration){ >+ StorableEnvironment vars = EnvironmentVariableManager.fUserSupplier.getWorkspaceEnvironmentCopy(); >+ boolean originalAppConEnv = vars.appendContributedEnvironment(); >+ boolean originalAppEnv = vars.appendEnvironment(); >+ boolean modified = false; >+ //if either of these two append value is true, set them to false >+ if(originalAppConEnv || originalAppEnv){ >+ modified=true; >+ vars.setAppendContributedEnvironment(false); >+ vars.setAppendEnvironment(false); >+ EnvironmentVariableManager.fUserSupplier.setWorkspaceEnvironment(vars); >+ } >+ IEnvironmentVariable[] envVars = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(configuration, true); >+ //if we modified the append values, back them up. >+ if(modified){ >+ vars.setAppendContributedEnvironment(originalAppConEnv); >+ vars.setAppendEnvironment(originalAppEnv); >+ EnvironmentVariableManager.fUserSupplier.setWorkspaceEnvironment(vars); >+ } >+ return envVars; >+ >+ } > /* (non-Javadoc) > * @see org.eclipse.cdt.make.core.MakeBuilder#invokeMake(int, org.eclipse.cdt.make.core.IMakeBuilderInfo, org.eclipse.core.runtime.IProgressMonitor) > */ >@@ -196,7 +222,8 @@ > HashMap<String, String> envMap = new HashMap<String, String>(); > > // Add variables from build info >- IEnvironmentVariable[] envVars = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(configuration, true); >+ //IEnvironmentVariable[] envVars = ManagedBuildManager.getEnvironmentVariableProvider().getVariables(configuration, true); >+ IEnvironmentVariable[] envVars = getEnVarWithoutWorkspaceVarAppend(configuration); > > for (IEnvironmentVariable environmentVariable : envVars) { > envMap.put(environmentVariable.getName(), environmentVariable.getValue()); >#P org.eclipse.ptp.rdt.ui >Index: src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java,v >retrieving revision 1.10 >diff -u -r1.10 RemoteMakefileWizardHandler.java >--- src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java 27 May 2011 20:44:01 -0000 1.10 >+++ src/org/eclipse/ptp/rdt/ui/wizards/RemoteMakefileWizardHandler.java 1 Jun 2011 18:15:44 -0000 >@@ -124,14 +124,6 @@ > doTemplatesPostProcess(project); > doCustom(project); > >- //turn off append local environment variables for remote projects >- ICConfigurationDescription c_cfgs[] = des.getConfigurations(); >- for (ICConfigurationDescription c_cfg : c_cfgs) { >- EnvironmentVariableManager.fUserSupplier.setAppendContributedEnvironment(false, c_cfg); >- EnvironmentVariableManager.fUserSupplier.setAppendEnvironment(false, c_cfg); >- } >- >- > } finally { > monitor.done(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 338595
:
196790
|
196806
|
196809
|
197133
|
197181
|
197331
|
197334