diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java index 92466a86eca..af4eb50adec 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java @@ -2620,25 +2620,30 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider public ICOutputEntry[] getOutputEntries(){ if(isManagedBuildOn()){ - return getDefaultOutputSettings(true); + return getDefaultOutputSettings(); } ICOutputEntry[] entries = getOutputEntrySettings(); if(entries == null || entries.length == 0){ - entries = getDefaultOutputSettings(false); + entries = getDefaultOutputSettings(); } return entries; } - private ICOutputEntry[] getDefaultOutputSettings(boolean managedBuildOn){ + private ICOutputEntry[] getDefaultOutputSettings(){ Configuration cfg = (Configuration)getConfguration(); if(cfg == null || cfg.isPreference() || cfg.isExtensionElement()){ return new ICOutputEntry[]{new COutputEntry(Path.EMPTY, null, ICLanguageSettingEntry.VALUE_WORKSPACE_PATH | ICLanguageSettingEntry.RESOLVED)}; } - IPath path = cfg.getOwner().getProject().getFullPath();; - if(managedBuildOn){ - path = path.append(cfg.getName()); + IPath path = ManagedBuildManager.getBuildFullPath(cfg, this); + IProject proj = cfg.getOwner().getProject(); + IPath projFullPath = proj.getFullPath(); + if(projFullPath.isPrefixOf(path)){ + path = path.removeFirstSegments(projFullPath.segmentCount()).makeRelative(); + } else { + path = Path.EMPTY; } + return new ICOutputEntry[]{new COutputEntry(path, null, ICLanguageSettingEntry.VALUE_WORKSPACE_PATH | ICLanguageSettingEntry.RESOLVED)}; } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CBuildSettingCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CBuildSettingCache.java index d6363535e6e..63b18c1a960 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CBuildSettingCache.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CBuildSettingCache.java @@ -32,12 +32,15 @@ public class CBuildSettingCache extends CDefaultBuildData implements private ICOutputEntry[] fResolvedOutputEntries; CBuildSettingCache(CBuildData base, CConfigurationDescriptionCache cfgCache){ - super(base.getId(), base); + super(/*base.getId(), base*/); + + fId = base.getId(); fCfgCache = cfgCache; fCfgCache.addBuildSetting(this); + copySettingsFrom(base); } void initEnvironmentCache(){ diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java index 50c16dd3592..b8ea3a5f061 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDescriptionCache.java @@ -204,6 +204,7 @@ public class CConfigurationDescriptionCache extends CDefaultConfigurationData void addBuildSetting(ICBuildSetting bs){ fChildList.add(bs); + fBuildData = (CBuildData)bs; } public ICProjectDescription getProjectDescription() {