Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dynamic icons from file system in plugin
Dynamic icons from file system in plugin [message #329122] Fri, 13 June 2008 09:23 Go to next message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
Can a plugin load icons/images from a URL such as
"file:///c:/myicon.gif" ? The URL.openStream() fails in PDE with an
UnkownHostException. The same code works in a simple, not plugin, java
program.

Any idea ?

Loïc
Re: Dynamic icons from file system in plugin [message #329126 is a reply to message #329122] Fri, 13 June 2008 11:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Loïc,

What you describe sounds like a really bad idea even if it works. What
does the stack trace look like? If it's a failure in the
URL.openStream itself I kind of doubt it's an Eclipse issue but more
fundamental. I suspect that file:/c:/myicon.gif and
file://c:/myicon.gif are likely to work better...



Loïc Quéran wrote:
> Can a plugin load icons/images from a URL such as
> "file:///c:/myicon.gif" ? The URL.openStream() fails in PDE with an
> UnkownHostException. The same code works in a simple, not plugin, java
> program.
>
> Any idea ?
>
> Loïc
Re: Dynamic icons from file system in plugin [message #329127 is a reply to message #329126] Fri, 13 June 2008 13:28 Go to previous messageGo to next message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
I want to integrate another tool with Eclipse. The other provides data,
which contains paths to icons which must be displayed in an Eclipse
TreeViewer.

The correct url should be file://localhost/c:/myicon.gif. In W3C specs,
it is written that localhost can be omitted.

file://c:/myicon.gif works in Firefox, which changes it to
file:///c:/myicon.gif which also works in Firefox.

There is no stack trace because ImageDescriptor.getImageData() fails
silently.



Ed Merks a écrit :
> Loïc,
>
> What you describe sounds like a really bad idea even if it works. What
> does the stack trace look like? If it's a failure in the
> URL.openStream itself I kind of doubt it's an Eclipse issue but more
> fundamental. I suspect that file:/c:/myicon.gif and
> file://c:/myicon.gif are likely to work better...
>
>
>
> Loïc Quéran wrote:
>> Can a plugin load icons/images from a URL such as
>> "file:///c:/myicon.gif" ? The URL.openStream() fails in PDE with an
>> UnkownHostException. The same code works in a simple, not plugin, java
>> program.
>>
>> Any idea ?
>>
>> Loïc
Re: Dynamic icons from file system in plugin [message #329129 is a reply to message #329127] Fri, 13 June 2008 13:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Loïc,

Did you try what I suggested? It's possible to step into the code to
see what's going on... And besides, you said you saw a failure with
leads me to believe the failure wasn't silent and that there will be a
stack trace in your log...

I thought the URI RFC only talked about the // segment representing the
authority... I think different schemes can interpret the information
there how they like....

(Please try to avoid doing a reply-all so I don't get direct notes to my
e-mail address.)


Loïc Quéran wrote:
> I want to integrate another tool with Eclipse. The other provides
> data, which contains paths to icons which must be displayed in an
> Eclipse TreeViewer.
>
> The correct url should be file://localhost/c:/myicon.gif. In W3C
> specs, it is written that localhost can be omitted.
>
> file://c:/myicon.gif works in Firefox, which changes it to
> file:///c:/myicon.gif which also works in Firefox.
>
> There is no stack trace because ImageDescriptor.getImageData() fails
> silently.
>
>
>
> Ed Merks a écrit :
>> Loïc,
>>
>> What you describe sounds like a really bad idea even if it works.
>> What does the stack trace look like? If it's a failure in the
>> URL.openStream itself I kind of doubt it's an Eclipse issue but more
>> fundamental. I suspect that file:/c:/myicon.gif and
>> file://c:/myicon.gif are likely to work better...
>>
>>
>>
>> Loïc Quéran wrote:
>>> Can a plugin load icons/images from a URL such as
>>> "file:///c:/myicon.gif" ? The URL.openStream() fails in PDE with an
>>> UnkownHostException. The same code works in a simple, not plugin,
>>> java program.
>>>
>>> Any idea ?
>>>
>>> Loïc
Re: Dynamic icons from file system in plugin [message #329698 is a reply to message #329129] Tue, 01 July 2008 13:10 Go to previous message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
Sorry for my late answer. As usually, you were right, Ed ...

Thanks a lot.

Loïc

Ed Merks a écrit :
> Loïc,
>
> Did you try what I suggested? It's possible to step into the code to
> see what's going on... And besides, you said you saw a failure with
> leads me to believe the failure wasn't silent and that there will be a
> stack trace in your log...
>
> I thought the URI RFC only talked about the // segment representing the
> authority... I think different schemes can interpret the information
> there how they like....
>
> (Please try to avoid doing a reply-all so I don't get direct notes to my
> e-mail address.)
>
>
> Loïc Quéran wrote:
>> I want to integrate another tool with Eclipse. The other provides
>> data, which contains paths to icons which must be displayed in an
>> Eclipse TreeViewer.
>>
>> The correct url should be file://localhost/c:/myicon.gif. In W3C
>> specs, it is written that localhost can be omitted.
>>
>> file://c:/myicon.gif works in Firefox, which changes it to
>> file:///c:/myicon.gif which also works in Firefox.
>>
>> There is no stack trace because ImageDescriptor.getImageData() fails
>> silently.
>>
>>
>>
>> Ed Merks a écrit :
>>> Loïc,
>>>
>>> What you describe sounds like a really bad idea even if it works.
>>> What does the stack trace look like? If it's a failure in the
>>> URL.openStream itself I kind of doubt it's an Eclipse issue but more
>>> fundamental. I suspect that file:/c:/myicon.gif and
>>> file://c:/myicon.gif are likely to work better...
>>>
>>>
>>>
>>> Loïc Quéran wrote:
>>>> Can a plugin load icons/images from a URL such as
>>>> "file:///c:/myicon.gif" ? The URL.openStream() fails in PDE with an
>>>> UnkownHostException. The same code works in a simple, not plugin,
>>>> java program.
>>>>
>>>> Any idea ?
>>>>
>>>> Loïc
Previous Topic:code template
Next Topic:Are you responsible for providing eclipse at your firm?
Goto Forum:
  


Current Time: Sat Jul 27 12:30:02 GMT 2024

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

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

Back to the top