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;
}

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 ; }
returns whether the item at the given index in the list ( visually ) is selected .
