@Nullable
  public ProjectStructureElement getSelectedElement() {
    final TreePath selectionPath = myTree.getSelectionPath();
    if (selectionPath != null && selectionPath.getLastPathComponent() instanceof MyNode node &&
        node.getConfigurable() instanceof ProjectStructureElementConfigurable<?> configurable) {
      return configurable.getProjectStructureElement();
    }
    return null;
  }
@Nullable
  public ProjectStructureElement getSelectedElement()