Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Plugin.getDefault().getDescriptor().getInstallURL() is deprecated
Plugin.getDefault().getDescriptor().getInstallURL() is deprecated [message #326371] Tue, 18 March 2008 09:09 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:elipse - problem with closing and relaunching
Next Topic:Table Viewer Vs Nebula Grid Viewer
Goto Forum:
  


Current Time: Fri Aug 16 09:09:59 GMT 2024

Powered by FUDForum. Page generated in 0.07473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top