public IStatus validate ( ISREInstall sre ) { final IStatus status ; if ( this . enableSystemWideSelector && this . systemSREButton . getSelection ( ) ) { if ( SARLRuntime . getDefaultSREInstall ( ) == null ) { status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , Messages . SREConfigurationBlock_5 ) ; } else { status = SARLEclipsePlugin . getDefault ( ) . createOkStatus ( ) ; } } else if ( ! this . projectProviderFactories . isEmpty ( ) && this . projectSREButton . getSelection ( ) ) { if ( retreiveProjectSRE ( ) == null ) { status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , Messages . SREConfigurationBlock_6 ) ; } else { status = SARLEclipsePlugin . getDefault ( ) . createOkStatus ( ) ; } } else if ( this . runtimeEnvironments . isEmpty ( ) ) { status = SARLEclipsePlugin . getDefault ( ) . createStatus ( IStatus . ERROR , Messages . SREConfigurationBlock_8 ) ; } else { status = sre . getValidity ( ) ; } return status ; }
Validate that the given SRE is valid in the context of the SRE configuration .