public static String getDeclaredBootstrap ( IPath path ) { try { final IFile location = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getFile ( path ) ; if ( location != null ) { final IPath pathLocation = location . getLocation ( ) ; if ( pathLocation != null ) { final File file = pathLocation . toFile ( ) ; if ( file . exists ( ) ) { if ( file . isDirectory ( ) ) { return getDeclaredBootstrapInFolder ( file ) ; } if ( file . isFile ( ) ) { return getDeclaredBootstrapInJar ( file ) ; } return null ; } } } final File file = path . makeAbsolute ( ) . toFile ( ) ; if ( file . exists ( ) ) { if ( file . isDirectory ( ) ) { return getDeclaredBootstrapInJar ( file ) ; } if ( file . isFile ( ) ) { return getDeclaredBootstrapInFolder ( file ) ; } } } catch ( Exception exception ) { // } return null ; }
Replies the bootstrap name declared within the given path corresponding to a JAR file or a folder .