public void RePopulateTreeView(IEditorComponent component, string selectedNode) { IRePopulatableComponent repopulatableComponent = component as IRePopulatableComponent; if (repopulatableComponent != null) { if (selectedNode == null) { repopulatableComponent.RePopulateTreeView(); } else { repopulatableComponent.RePopulateTreeView(selectedNode); } } }