From 1e03b89be359b2f42a82593eb3463ab777515edd Mon Sep 17 00:00:00 2001 From: Denys Almazov Date: Thu, 14 Sep 2023 16:11:59 +0300 Subject: [PATCH] change(sdkconfig): improved SDKConfigurationFilter --- .../idf/sdk/config/ui/SDKConfigurationFilter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/SDKConfigurationFilter.java b/bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/SDKConfigurationFilter.java index a49179a43..e58c3db52 100644 --- a/bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/SDKConfigurationFilter.java +++ b/bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/SDKConfigurationFilter.java @@ -10,12 +10,12 @@ public class SDKConfigurationFilter extends PatternFilter @Override protected boolean isLeafMatch(Viewer viewer, Object element) { - if (element instanceof KConfigMenuItem) { KConfigMenuItem highLevelElem = (KConfigMenuItem) element; - return wordMatches(highLevelElem.getTitle()) || recursiveMatch(highLevelElem); + return wordMatches(highLevelElem.getTitle()) || wordMatches(highLevelElem.getName()) + || recursiveMatch(highLevelElem); } return false; @@ -25,12 +25,12 @@ private boolean recursiveMatch(KConfigMenuItem parent) { if (parent.getChildren().isEmpty()) { - return wordMatches(parent.getName()); + return wordMatches(parent.getName()) || wordMatches(parent.getTitle()); } for (KConfigMenuItem child : parent.getChildren()) { - if (wordMatches(child.getName()) || recursiveMatch(child)) + if (wordMatches(child.getName()) || wordMatches(child.getTitle()) || recursiveMatch(child)) { return true; }