private void onItemSelected ( TreeItem treeItem ) { treeItem . getElement ( ) . focus ( ) ; final LinkedList < String > path = resolvePath ( treeItem ) ; formView . clearDisplay ( ) ; descView . clearDisplay ( ) ; ModelNode address = toAddress ( path ) ; ModelNode displayAddress = address . clone ( ) ; boolean isPlaceHolder = ( treeItem instanceof PlaceholderItem ) ; //ChildInformation childInfo = findChildInfo(treeItem); if ( path . size ( ) % 2 == 0 ) { /*String denominatorType = AddressUtils.getDenominatorType(address.asPropertyList()); boolean isSingleton = denominatorType!=null ? childInfo.isSingleton(denominatorType) : false; // false==root*/ // addressable resources presenter . readResource ( address , isPlaceHolder ) ; toggleEditor ( true ) ; filter . setEnabled ( true ) ; } else { toggleEditor ( false ) ; // display tweaks displayAddress . add ( path . getLast ( ) , WILDCARD ) ; // force loading of children upon selection loadChildren ( ( ModelTreeItem ) treeItem , false ) ; filter . setEnabled ( false ) ; } nodeHeader . updateDescription ( displayAddress ) ; }
When a tree item is clicked we load the resource .