question: private void updateCatalogTree ( ) { CatalogTreeManager manager = InstanceManager . getDefault ( jmri . CatalogTreeManager . class ) ; CatalogTree tree = manager . getBySystemName ( "NXDI" ) ; if ( tree == null ) { tree = manager . newCatalogTree ( "NXDI" , "Default Icons" ) ; } CatalogTreeNode root = tree . getRoot ( ) ; Enumeration < CatalogTreeNode > e = root . children ( ) ; String name = _defaultIcons . toString ( ) ; while ( e . hasMoreElements ( ) ) { CatalogTreeNode nChild = e . nextElement ( ) ; if ( name . equals ( nChild . toString ( ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Remove node " + nChild ) ; } root . remove ( nChild ) ; break ; } } root . add ( _defaultIcons ) ; ImageIndexEditor . indexChanged ( true ) ; }
target:  If icons are changed, update global tree