public static @NotNull TailType handleCompletionChar(final @NotNull Editor editor, final @NotNull LookupElement lookupElement, final char completionChar) {
    final TailType type = getDefaultTailType(completionChar);
    if (type != null) {
      return type;
    }

    if (lookupElement instanceof LookupItem) {
      final LookupItem<?> item = (LookupItem)lookupElement;
      final TailType attr = item.getAttribute(TAIL_TYPE_ATTR);
      if (attr != null) {
        return attr;
      }
    }
    return TailTypes.noneType();
  }
public static @NotNull TailType handleCompletionChar(final @NotNull Editor editor, final @NotNull LookupElement lookupElement, final char completionChar)