@Override
  protected void addCompletions(@NotNull CompletionParameters params,
                                @NotNull ProcessingContext context,
                                @NotNull CompletionResultSet result) {
    final YamlMetaTypeProvider metaTypeProvider = getMetaTypeProvider(params);
    if (metaTypeProvider == null) {
      return;
    }

    PsiElement position = params.getPosition();

    if (isOfType(position.getParent(), YAMLElementTypes.SCALAR_PLAIN_VALUE, YAMLElementTypes.SCALAR_QUOTED_STRING)) {
      // it's a value or an inserted key (no ':' after)
      processValueOrInsertedKey(params, result, metaTypeProvider);
    }
    else if (isOfType(position, YAMLTokenTypes.SCALAR_KEY) && position.getParent() instanceof YAMLKeyValue) {
      // if it's an updated key (followed by ':')
      processUpdatedKey(params, result, metaTypeProvider);
    }
  }
@Override
  protected void addCompletions(@NotNull CompletionParameters params,
                                @NotNull ProcessingContext context,
                                @NotNull CompletionResultSet result)