public AbstractSREInstallPage getPage ( ISREInstall sre ) { final IExtensionPoint extensionPoint = Platform . getExtensionRegistry ( ) . getExtensionPoint ( SARLEclipsePlugin . PLUGIN_ID , SARLEclipseConfig . EXTENSION_POINT_SRE_INSTALL_PAGES ) ; if ( sre != null && extensionPoint != null ) { IConfigurationElement firstTypeMatching = null ; for ( final IConfigurationElement info : extensionPoint . getConfigurationElements ( ) ) { final String id = info . getAttribute ( "sreInstallId" ) ; //$NON-NLS-1$ if ( sre . getId ( ) . equals ( Strings . nullToEmpty ( id ) ) ) { try { final AbstractSREInstallPage page = ( AbstractSREInstallPage ) info . createExecutableExtension ( "class" ) ; //$NON-NLS-1$ page . setExistingNames ( this . names ) ; return page ; } catch ( CoreException e ) { SARLEclipsePlugin . getDefault ( ) . log ( e ) ; } } else if ( firstTypeMatching == null && isInstance ( info . getAttribute ( "sreInstallType" ) , sre ) ) { //$NON-NLS-1$ firstTypeMatching = info ; } } if ( firstTypeMatching != null ) { try { final AbstractSREInstallPage page = ( AbstractSREInstallPage ) firstTypeMatching . createExecutableExtension ( "class" ) ; //$NON-NLS-1$ page . setExistingNames ( this . names ) ; return page ; } catch ( CoreException e ) { SARLEclipsePlugin . getDefault ( ) . log ( e ) ; } } } if ( sre == null || sre instanceof StandardSREInstall ) { final StandardSREPage standardVMPage = new StandardSREPage ( ) ; standardVMPage . setExistingNames ( this . names ) ; return standardVMPage ; } throw new SREException ( MessageFormat . format ( Messages . SREInstallWizard_5 , sre . getName ( ) ) ) ; }
Returns a page to use for editing a SRE install type .