@Override
    public void addElement(@NotNull LookupElement element) {
      ProgressManager.checkCanceled();
      if (!element.isValid()) {
        LOG.error("Invalid lookup element: " + element + " of " + element.getClass() +
                  " in " + parameters.getOriginalFile() + " of " + parameters.getOriginalFile().getClass());
        return;
      }

      sorter = sorter == null ? getCompletionService().defaultSorter(parameters, getPrefixMatcher()) : sorter;

      CompletionResult matched = CompletionResult.wrap(element, getPrefixMatcher(), sorter);
      if (matched != null) {
        element.putUserData(LOOKUP_ELEMENT_CONTRIBUTOR, contributor);
        element.putUserData(LOOKUP_ELEMENT_RESULT_ADD_TIMESTAMP_MILLIS, System.currentTimeMillis());
        element.putUserData(LOOKUP_ELEMENT_RESULT_SET_ORDER, itemCounter);
        itemCounter += 1;
        passResult(matched);
      }
    }
@Override
    public void addElement(@NotNull LookupElement element)