public static URL getSourceUrl ( SourceUnit source ) { URL url = null ; final String filename = source . getName ( ) ; if ( filename == null ) { return null ; } Resource resource = new FileSystemResource ( filename ) ; if ( resource . exists ( ) ) { try { url = resource . getURL ( ) ; } catch ( IOException e ) { // ignore } } return url ; }
Find URL of SourceUnit