mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Apply Chris' patch to handle ToolChain versions
This commit is contained in:
parent
041dbf3c91
commit
03c8b2fa41
2 changed files with 13 additions and 11 deletions
|
@ -187,20 +187,21 @@ public final class MBSCustomPageData
|
|||
{
|
||||
ToolchainData tcd = (ToolchainData) iterator.next();
|
||||
|
||||
// look for toolchain with same id
|
||||
// look for toolchain with same id. The id in the tool-chain data should never
|
||||
// contain a version suffix.
|
||||
if (tcd.getId().equals(id))
|
||||
{
|
||||
// if we don't check versions then we're done
|
||||
if (version == null)
|
||||
if (tcd.getVersionsSupported() == null)
|
||||
return true;
|
||||
|
||||
// does the toolchain have a compatible version?
|
||||
|
||||
|
||||
// is the toolchain of one of the specified versions?
|
||||
for (int k = 0; k < tcd.getVersionsSupported().length; k++)
|
||||
{
|
||||
// TODO: implement version support - should this check for an exact match?
|
||||
// An older version of a tool-chain could use a different custom page
|
||||
// than a newer version.
|
||||
if (tcd.getVersionsSupported()[k].compareTo(version) >= 0)
|
||||
// check for an exact version match
|
||||
if (tcd.getVersionsSupported()[k].equals(version))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.managedbuilder.ui.wizards;
|
|||
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIMessages;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
|
@ -363,11 +364,11 @@ public final class MBSCustomPageManager
|
|||
while (toolchainIterator.hasNext())
|
||||
{
|
||||
IToolChain toolchain = (IToolChain) toolchainIterator.next();
|
||||
String id = ManagedBuildManager.getIdFromIdAndVersion(toolchain.getId());
|
||||
String version = ManagedBuildManager.getVersionFromIdAndVersion(toolchain.getId());
|
||||
|
||||
// get the ID and version
|
||||
// version support in MBS is not complete yet so just check the id for now
|
||||
// TODO: implement version support
|
||||
if (toolchain.getId().equals(toolchainData[k].getId()))
|
||||
// check the ID and version
|
||||
if (page.shouldBeVisibleForToolchain(id, version))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue