public void initialize ( ) { // Initialize the SRE list this . runtimeEnvironments . clear ( ) ; final ISREInstall [ ] sres = SARLRuntime . getSREInstalls ( ) ; Arrays . sort ( sres , new Comparator < ISREInstall > ( ) { @ Override public int compare ( ISREInstall o1 , ISREInstall o2 ) { return o1 . getName ( ) . compareTo ( o2 . getName ( ) ) ; } } ) ; final List < String > labels = new ArrayList <> ( sres . length ) ; for ( int i = 0 ; i < sres . length ; ++ i ) { if ( sres [ i ] . getValidity ( ) . isOK ( ) ) { this . runtimeEnvironments . add ( sres [ i ] ) ; labels . add ( sres [ i ] . getName ( ) ) ; } } this . runtimeEnvironmentCombo . setItems ( labels . toArray ( new String [ labels . size ( ) ] ) ) ; // Reset the labels of the external SRE configurations updateExternalSREButtonLabels ( ) ; // Initialize the type of configuration if ( this . enableSystemWideSelector ) { this . specificSREButton . setSelection ( false ) ; if ( ! this . projectProviderFactories . isEmpty ( ) ) { this . projectSREButton . setSelection ( false ) ; } this . systemSREButton . setSelection ( true ) ; } else if ( ! this . projectProviderFactories . isEmpty ( ) ) { this . specificSREButton . setSelection ( false ) ; if ( this . enableSystemWideSelector ) { this . systemSREButton . setSelection ( false ) ; } this . projectSREButton . setSelection ( true ) ; } // Wait for SRE list updates. this . sreListener = new InstallChange ( ) ; SARLRuntime . addSREInstallChangedListener ( this . sreListener ) ; updateEnableState ( ) ; }
Initialize the block with the installed JREs . The selection and the components states are not updated by this function .