[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Plugin.getDefault().getDescriptor().getInstallURL() is deprecated

Alexandre Jaquet ha scritto:
Hi,

Hi, Alexandre.
If you take a look at the Javadoc for IPluginDescriptor you'll find the information you need (for this and other deprecated methods).
In your case, anyway, you should use:


getDefault().getBundle().getEntry("/")

instead of

getDefault().getDescriptor().getInstallURL()

And here's the JavaDoc for 3.2:

http://help.eclipse.org/help32/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/IPluginDescriptor.html

Have a nice reading... ;-)

A.

In one action I load an image by doing the following code

private static ImageDescriptor image;
static {
URL url = null;
try {
url = new URL(PageUIPlugin.getDefault().getDescriptor().getInstallURL(),
"icons/obj16/saveAsImage.png");
} catch (MalformedURLException e) {
}
image = ImageDescriptor.createFromURL(url);
}
but .getDescriptor().getInstallURL() is deprecated what do I need to use in place of it ?


Thanks

Alexandre