private boolean matches(@NotNull String text) {
   if (isUnitTest) {
     final SpeedSearchComparator comparator = mySpeedSearch.getComparator();
     return StringUtil.isNotEmpty(myTestSearchFilter)
         && comparator.matchingFragments(myTestSearchFilter, text) != null;
   }
   return mySpeedSearch.matchingFragments(text) != null;
 }
 ObjectWithWeight(Object element, String pattern, SpeedSearchComparator comparator) {
   this.node = element;
   final String text = getElementText(element);
   if (text != null) {
     final Iterable<TextRange> ranges = comparator.matchingFragments(pattern, text);
     if (ranges != null) {
       for (TextRange range : ranges) {
         weights.add(range);
       }
     }
   }
   Collections.sort(weights, TEXT_RANGE_COMPARATOR);
 }