@Override
  @NotNull
  public StructureViewModel getTreeModel() {
    StructureView view = getSelectedStructureView();
    if (view != null) return view.getTreeModel();
    class M extends TextEditorBasedStructureViewModel implements StructureViewTreeElement, ItemPresentation {
      M() { super(null, null);}

      @NotNull @Override public StructureViewTreeElement getRoot() { return this;} 
      @Override public Object getValue() { return null;} 
      @NotNull @Override public ItemPresentation getPresentation() { return this;} 
      @Override public TreeElement @NotNull [] getChildren() { return EMPTY_ARRAY;} 
      @Nullable @Override public String getPresentableText() { return null;} 
      @Nullable @Override public Icon getIcon(boolean unused) { return null;}
    }
    return new M();
  }
@Override
  @NotNull
  public StructureViewModel getTreeModel()