mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 335001 - Copying a configuration persists previous exported library path, patch 1
This commit is contained in:
parent
00b07da35e
commit
e6deaf8203
2 changed files with 7 additions and 8 deletions
|
@ -2673,7 +2673,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
/**
|
/**
|
||||||
* @return whether this Configuration exports settings to other referenced configurations
|
* @return whether this Configuration exports settings to other referenced configurations
|
||||||
*/
|
*/
|
||||||
private boolean canExportedArtifactInfo() {
|
public boolean canExportedArtifactInfo() {
|
||||||
if (isExtensionConfig)
|
if (isExtensionConfig)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigInfoFa
|
||||||
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
||||||
import org.eclipse.cdt.core.model.LanguageManager;
|
import org.eclipse.cdt.core.model.LanguageManager;
|
||||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
|
import org.eclipse.cdt.core.settings.model.ICExternalSetting;
|
||||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||||
import org.eclipse.cdt.core.settings.model.IModificationContext;
|
import org.eclipse.cdt.core.settings.model.IModificationContext;
|
||||||
|
@ -238,13 +239,11 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
|
||||||
Configuration cfg = (Configuration)((BuildConfigurationData)base).getConfiguration();
|
Configuration cfg = (Configuration)((BuildConfigurationData)base).getConfiguration();
|
||||||
Configuration newCfg = copyCfg(cfg, des);
|
Configuration newCfg = copyCfg(cfg, des);
|
||||||
|
|
||||||
// IManagedBuildInfo info = getBuildInfo(des);
|
if(!newCfg.getId().equals(cfg.getId()) && newCfg.canExportedArtifactInfo()){
|
||||||
// ManagedProject mProj = (ManagedProject)info.getManagedProject();
|
// Bug 335001: Remove existing exported settings as they point at this configuration
|
||||||
//
|
for (ICExternalSetting extSetting : newCfg.getConfigurationDescription().getExternalSettings())
|
||||||
// Configuration newCfg = new Configuration(mProj, cfg, des.getId(), true, true, false);
|
newCfg.getConfigurationDescription().removeExternalSetting(extSetting);
|
||||||
// newCfg.setConfigurationDescription(des);
|
// Now export the new settings
|
||||||
// newCfg.setName(des.getName());
|
|
||||||
if(!newCfg.getId().equals(cfg.getId())){
|
|
||||||
newCfg.exportArtifactInfo();
|
newCfg.exportArtifactInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue