[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: Plugin.getDefault().getDescriptor().getInstallURL() is deprecated
|
- From: Angelo Tata <angelo.tata@xxxxxxxxx>
- Date: Tue, 18 Mar 2008 14:46:21 +0100
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.12 (Windows/20080213)
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