public static URL getURL(String sPluginRelativePath) { URL url = null; if (Platform.getExtensionRegistry() != null) { try { url = new URL(ChartUIPlugin.getDefault().getBundle().getEntry("/"), sPluginRelativePath); } catch (MalformedURLException e ) { e.printStackTrace(); } } else { try { url = new URL("file: } catch (MalformedURLException e ) { e.printStackTrace(); } }
public static URL getURL( String sPluginRelativePath ) { URL url = null; if ( Platform.getExtensionRegistry( ) != null ) { try { url = new URL( ChartUIPlugin.getDefault( ) .getBundle( ) .getEntry( "/" ), sPluginRelativePath ); } catch ( MalformedURLException e ) { logger.log( e ); } } else { try { url = new URL( "file: } catch ( MalformedURLException e ) { logger.log( e ); } }
    public static URL getURL(String sPluginRelativePath)    {        URL url = null;        if (Platform.getExtensionRegistry() != null)        {            try            {                url = new URL(ChartUIPlugin.getDefault().getBundle().getEntry("/"), sPluginRelativePath); //$NON-NLS-1$            }            catch (MalformedURLException e )            {                e.printStackTrace();            }        }        else        {            try            {                url = new URL("file:///" + new File(sPluginRelativePath).getAbsolutePath()); //$NON-NLS-1$            }            catch (MalformedURLException e )            {                e.printStackTrace();            }        }        return url;    }