diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageData.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageData.java index be3dd4990df..b49e0ad7292 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageData.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageData.java @@ -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; } diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageManager.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageManager.java index d954058b0a5..9cbe584fb59 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageManager.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSCustomPageManager.java @@ -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; }