From 47d08ec20444e80ed180e48b29b5c43559e9c26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Svensson?= Date: Thu, 12 Apr 2018 12:39:28 +0200 Subject: [PATCH] Bug 533473 - Dynamically hide option categories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow applicabilityCalculator to hide optionCategory items that are located on the toolchain. Show in the schema that applicabilityCalculator is a valid attribute for optionCategory. Change-Id: I6adb22b0af2a2c7fe45ea142049fcc2687d105b9 Signed-off-by: Torbjörn Svensson --- .../schema/buildDefinitions.exsd | 12 +++++++++++- .../ui/properties/ToolListContentProvider.java | 8 ++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd b/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd index cc87103afef..14a002e4b7d 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd +++ b/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd @@ -1186,6 +1186,16 @@ The path is relative to the plug-in directory which defines .buildDefinitions. + + + + Optional class which is used to determine dynamically at runtime whether the option category is visible. This class must implement the IOptionCategoryApplicability interface. If no calculator is specified then the option category is always visible. + + + + + + @@ -1451,7 +1461,7 @@ Additional special types exist to flag options of special relevance to the build - Optional class which is used to determine dynamically at runtime whether the option is visible, enabled, and used in command line generation. This class must impelment the IOptionApplicability interface. If no calculator is specified then the option is always visible, enabled, and used in command line generation. + Optional class which is used to determine dynamically at runtime whether the option is visible, enabled, and used in command line generation. This class must implement the IOptionApplicability interface. If no calculator is specified then the option is always visible, enabled, and used in command line generation. diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java index 674daaad240..f8a3962deba 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java @@ -9,6 +9,7 @@ * Timesys - Initial API and implementation * IBM Rational Software * Miwako Tokugawa (Intel Corporation) - bug 222817 (OptionCategoryApplicability) + * Torbjörn Svensson (STMicroelectronics) - bug #533473 *******************************************************************************/ package org.eclipse.cdt.managedbuilder.ui.properties; @@ -60,8 +61,11 @@ public class ToolListContentProvider implements ITreeContentProvider{ // Create an element for each one for (int i=0; i