Plugin.getDefault().getDescriptor().getInstallURL() is deprecated [message #326371] |
Tue, 18 March 2008 09:09 |
Eclipse User |
|
|
|
Originally posted by: alexjaquet.gmail.com
Hi,
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
|
|
|
Re: Plugin.getDefault().getDescriptor().getInstallURL() is deprecated [message #326377 is a reply to message #326371] |
Tue, 18 March 2008 13:46 |
Eclipse User |
|
|
|
Originally posted by: angelo.tata.gmail.com
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.do c.isv/reference/api/org/eclipse/core/runtime/IPluginDescript or.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
|
|
|
Powered by
FUDForum. Page generated in 0.03874 seconds