From dbdf6703efcc69bc32cb78ffe964a527e2b01fd9 Mon Sep 17 00:00:00 2001 From: James Blackburn Date: Fri, 9 Oct 2009 14:37:11 +0000 Subject: [PATCH] Bug 291887 Allow build configurations to reference other configurations in the same project --- .../src/org/eclipse/cdt/ui/newui/RefsTab.java | 74 +++++++++---------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RefsTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RefsTab.java index acceb28a236..f91a472c566 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RefsTab.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RefsTab.java @@ -106,15 +106,10 @@ public class RefsTab extends AbstractCPropertyTab { }}); } - - - - + // Class which represents "Active" configuration - class ActiveCfg { - IProject project; + private static class ActiveCfg { public ActiveCfg(IProject _project) { - project = _project; } @Override public String toString() { @@ -148,11 +143,9 @@ public class RefsTab extends AbstractCPropertyTab { for (int j=0; j 0) { // cfgs[0] is "Active": has no cfg Id - Object ob = cfgs[j].getData(); - if (ob instanceof ICConfigurationDescription) { - cfgId = ((ICConfigurationDescription)ob).getId(); - } + Object ob = cfgs[j].getData(); + if (ob instanceof ICConfigurationDescription) { + cfgId = ((ICConfigurationDescription)ob).getId(); } refs.put(element.getText(), cfgId); break; @@ -166,41 +159,44 @@ public class RefsTab extends AbstractCPropertyTab { private void initData() { tree.removeAll(); IProject p = page.getProject(); - if (p == null) return; - IProject[] ps = p.getWorkspace().getRoot().getProjects(); + if (p == null) + return; Map refs = getResDesc().getConfiguration().getReferenceInfo(); - - TreeItem ti, ti1; - for (int i=0; i