mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
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>
This commit is contained in:
parent
bd57216cbf
commit
573dd7fd5b
1 changed files with 47 additions and 0 deletions
|
@ -271,6 +271,29 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue