summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Eblen2012-05-07 17:04:37 (EDT)
committer Chris Recoskie2012-05-14 11:27:03 (EDT)
commit573dd7fd5b57fbb9dcf7ed06cdc42a4fb3f6f279 (patch)
treee458817b5b24a9693ed6bd69b51f48025d2b6d65
parentbd57216cbf569a93a99d9f7140032d6ecaff6d6d (diff)
downloadorg.eclipse.cdt-573dd7fd5b57fbb9dcf7ed06cdc42a4fb3f6f279.zip
org.eclipse.cdt-573dd7fd5b57fbb9dcf7ed06cdc42a4fb3f6f279.tar.gz
org.eclipse.cdt-573dd7fd5b57fbb9dcf7ed06cdc42a4fb3f6f279.tar.bz2
Bug 363612 - [API] Add toolchain accessor functions to MBSWizardHandler
Change-Id: I9bfd3f9aa2b6007172466be212f5f45b668c231f Reviewed-on: https://git.eclipse.org/r/5870 Reviewed-by: Chris Recoskie <recoskie@ca.ibm.com> Tested-by: Chris Recoskie <recoskie@ca.ibm.com> IP-Clean: Chris Recoskie <recoskie@ca.ibm.com>
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
index 8d204ec..34a8ce0 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
@@ -272,6 +272,29 @@ public class MBSWizardHandler extends CWizardHandler {
}
/**
+ * Get a map from toolchain names to actual toolchains.
+ * This list should mirror the list displayed in the wizard.
+ * Bug #363612
+ *
+ * @since 8.1
+ * @return the map
+ */
+ public SortedMap<String, IToolChain> getToolChains() {
+ Set<String> toolChainNames = this.tc_filter();
+ SortedMap<String, IToolChain> toolChainMap = new TreeMap<String, IToolChain>();
+
+ for (String toolChainName : toolChainNames) {
+ IToolChain tc = tcs.get(toolChainName);
+ if (tc == null) {
+ toolChainMap.put(toolChainName, null);
+ } else {
+ toolChainMap.put(tc.getUniqueRealName(), tc);
+ }
+ }
+ return toolChainMap;
+ }
+
+ /**
* Checks whether given toolchain can be displayed
*
* @param tcId - toolchain _NAME_ to check
@@ -708,6 +731,30 @@ public class MBSWizardHandler extends CWizardHandler {
else
return entryInfo.tc_filter().size();
}
+ /**
+ * Get a map from toolchain names to actual toolchains.
+ * Bug #363612
+ *
+ * @since 8.1
+ * @return the map
+ */
+ public SortedMap<String, IToolChain> getToolChains() {
+ if (entryInfo == null)
+ return full_tcs;
+ else
+ return entryInfo.getToolChains();
+ }
+ /**
+ * Get the table that is displayed in the left pane.
+ * This allow for changes after handler creation.
+ * Bug #363612
+ *
+ * @since 8.1
+ * @return the table
+ */
+ public Table getToolChainsTable() {
+ return table;
+ }
public String getPropertyId() {
return propertyId;
}