@Override
  public @Nullable StructureViewBuilder getStructureViewBuilder(final @NotNull PsiFile psiFile) {
    if (!(psiFile instanceof YAMLFile)) {
      return null;
    }

    for (YAMLCustomStructureViewFactory extension : YAMLCustomStructureViewFactory.EP_NAME.getExtensionList()) {
      final StructureViewBuilder builder = extension.getStructureViewBuilder((YAMLFile)psiFile);
      if (builder != null) {
        return builder;
      }
    }

    return new TreeBasedStructureViewBuilder() {
      @Override
      public @NotNull StructureViewModel createStructureViewModel(@Nullable Editor editor) {
        return new StructureViewModelBase(psiFile, editor, new YAMLStructureViewFile((YAMLFile)psiFile)){
          @Override
          public @NotNull Collection<NodeProvider<?>> getNodeProviders() {
            return Collections.singleton(new YAMLAliasResolveNodeProvider());
          }
        }
          .withSorters(Sorter.ALPHA_SORTER)
          .withSuitableClasses(YAMLFile.class, YAMLDocument.class, YAMLKeyValue.class);
      }
    };
  }
@Override
  public @Nullable StructureViewBuilder getStructureViewBuilder(final @NotNull PsiFile psiFile)