Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to use getResourceLocator().getImage to get image by absolute path
How to use getResourceLocator().getImage to get image by absolute path [message #891848] Tue, 26 June 2012 09:36 Go to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
Hi All,

I'm having the issue of using getResourceLocator().getImage in edit plugin

I want to locate image that isn't in the eclipse workspace.
and the image in another windows partition. ex: G:/image.bmp
How can I do that ?


Thanks
Re: How to use getResourceLocator().getImage to get image by absolute path [message #891867 is a reply to message #891848] Tue, 26 June 2012 11:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30350
Registered: July 2009
Senior Member
Beck,

If you have an absolute path you can create a file: URL from it so you
don't need to use the resource locator in that case...

On 26/06/2012 11:36 AM, becks m wrote:
> Hi All,
>
> I'm having the issue of using getResourceLocator().getImage in edit
> plugin
>
> I want to locate image that isn't in the eclipse workspace.
> and the image in another windows partition. ex: G:/image.bmp
> How can I do that ?
>
>
> Thanks
Re: How to use getResourceLocator().getImage to get image by absolute path [message #892117 is a reply to message #891867] Wed, 27 June 2012 07:08 Go to previous message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
Ed Merks wrote on Tue, 26 June 2012 07:32
Beck,

If you have an absolute path you can create a file: URL from it so you
don't need to use the resource locator in that case...

On 26/06/2012 11:36 AM, becks m wrote:
> Hi All,
>
> I'm having the issue of using getResourceLocator().getImage in edit
> plugin
>
> I want to locate image that isn't in the eclipse workspace.
> and the image in another windows partition. ex: G:/image.bmp
> How can I do that ?
>
>
> Thanks



Thanks Ed for your response again Smile,

I've tried getImage(URL) directly as

getImage("file://G:/image.bmp" );

but I get this error
An error has occurred. See error log for more details.
The image resource 'file://G:/word.bmp' could not be located

also, it gives me the same error when I use getImage("file:\\\\G:\image.bmp" );


Am I missing something ?

Previous Topic:EMap and resolved keys
Next Topic:CDO Dawn problem
Goto Forum:
  


Current Time: Sun Aug 18 03:11:28 GMT 2019

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

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

Back to the top