Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Get InputStream for resource defined in extension point.
Get InputStream for resource defined in extension point. [message #334638] Sat, 21 February 2009 13:54 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hello.

I have a custom extension point that defines the attribute "descriptor"
which is of type "resource".
How do I now get an InputStream of that resource.
I can access the attribute itself with
String descriptor = element.getAttribute("descriptor");
What to do next to get an InputStream for this descriptor resource?

Best regards,
Kai
Re: Get InputStream for resource defined in extension point. [message #334639 is a reply to message #334638] Sat, 21 February 2009 14:09 Go to previous message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Ok ... I just found the solution myself.

Bundle bundle = Platform.getBundle(element.getContributor().getName());
URL descriptorUrl = bundle.getResource(element.getAttribute("descriptor"));

From there on it's trivial.

Kai

Kai Schlamp schrieb:
> Hello.
>
> I have a custom extension point that defines the attribute "descriptor"
> which is of type "resource".
> How do I now get an InputStream of that resource.
> I can access the attribute itself with
> String descriptor = element.getAttribute("descriptor");
> What to do next to get an InputStream for this descriptor resource?
>
> Best regards,
> Kai
Previous Topic:SelectionProvider is not set in the WindowSelectionService
Next Topic:How to debug RCP and target platform is WTP
Goto Forum:
  


Current Time: Mon Dec 30 17:44:23 GMT 2024

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

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

Back to the top