selection in the workbench has been changed . we can change the state of the ` real ' action here if we want , but this can only happen after the delegate has been created . concode_field_sep IWorkbenchWindow workbenchWindow concode_elem_sep IResource currentSelection concode_field_sep void init concode_elem_sep void run concode_elem_sep void dispose concode_elem_sep void setActivePart
void function ( IAction arg0 , ISelection arg1 ) { if ( arg1 instanceof IStructuredSelection && ( ( IStructuredSelection ) arg1 ) . size ( ) == 1 ) { Object loc0 = ( ( IStructuredSelection ) arg1 ) . getFirstElement ( ) ; if ( loc0 != null && loc0 instanceof IResource ) { currentSelection = ( IResource ) loc0 ; } } }