question: protected void handleSelected ( StructuredSelection selection ) { IStatus status = new Status ( IStatus . OK , PlatformUI . PLUGIN_ID , IStatus . OK , EMPTY_STRING , null ) ; Object [ ] lastSelection = currentSelection ; currentSelection = selection . toArray ( ) ; if ( selection . size ( ) == 0 ) { status = new Status ( IStatus . ERROR , PlatformUI . PLUGIN_ID , IStatus . ERROR , EMPTY_STRING , null ) ; if ( lastSelection != null && getListSelectionLabelDecorator ( ) != null ) { list . update ( lastSelection , null ) ; } currentSelection = null ; } else { status = new Status ( IStatus . ERROR , PlatformUI . PLUGIN_ID , IStatus . ERROR , EMPTY_STRING , null ) ; List items = selection . toList ( ) ; Object item = null ; IStatus tempStatus = null ; for ( Iterator it = items . iterator ( ) ; it . hasNext ( ) ; ) { Object o = it . next ( ) ; if ( o instanceof ItemsListSeparator ) { continue ; } item = o ; tempStatus = validateItem ( item ) ; if ( tempStatus . isOK ( ) ) { status = new Status ( IStatus . OK , PlatformUI . PLUGIN_ID , IStatus . OK , EMPTY_STRING , null ) ; } else { status = tempStatus ; break ; } } if ( lastSelection != null && getListSelectionLabelDecorator ( ) != null ) { list . update ( lastSelection , null ) ; } if ( getListSelectionLabelDecorator ( ) != null ) { list . update ( currentSelection , null ) ; } } refreshDetails ( ) ; updateStatus ( status ) ; }
target:  Handle selection in the items list by updating labels of selected and unselected items and refresh the details field using the selection.