question: protected boolean isIndexSelected ( IStructuredSelection selection , int index ) { if ( selection . isEmpty ( ) ) { return false ; } Iterator < ? > entries = selection . iterator ( ) ; List < IRuntimeClasspathEntry > list = getCustomEntriesAsList ( ) ; while ( entries . hasNext ( ) ) { Object next = entries . next ( ) ; if ( list . indexOf ( next ) == index ) { return true ; } } return false ; }
target:  Returns whether the item at the given index in the list (visually) is selected.