Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Loas resource through eclipse extension
Loas resource through eclipse extension [message #75225] Thu, 03 April 2008 07:04 Go to next message
trushna is currently offline trushnaFriend
Messages: 24
Registered: July 2009
Junior Member
Hello everyone,

I need to load one .properties file through eclipse extension.
Extension element details allows to contribute a file(non java) to the
extension using 'resource Type'. But i donno how to load it in the code.
I tried createExecutableExtension thinking it will give me object of that
file(IFile) but it didnt work.
Can anyone help?
Re: Loas resource through eclipse extension [message #75246 is a reply to message #75225] Fri, 04 April 2008 02:32 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
Try asking his question on eclipse.newcomer. Offhand, I don't remember
the magic to do this, but somebody on newcomer probably will.

Wayne

On Thu, 2008-04-03 at 07:04 +0000, Trushna wrote:
> Hello everyone,
>
> I need to load one .properties file through eclipse extension.
> Extension element details allows to contribute a file(non java) to the
> extension using 'resource Type'. But i donno how to load it in the code.
> I tried createExecutableExtension thinking it will give me object of that
> file(IFile) but it didnt work.
> Can anyone help?
>
Re: Loas resource through eclipse extension [message #75361 is a reply to message #75246] Tue, 15 July 2008 05:26 Go to previous message
trushna is currently offline trushnaFriend
Messages: 24
Registered: July 2009
Junior Member
I made it work this way:

just got name of the file/resource through extension.

and then loaded the file in my code using:

Bundle bundle = Platform.getBundle(extensions[i].getNamespaceIdentifier());
URL url = bundle.getResource(<name of the file>);

Thanks for the reply.
Re: Loas resource through eclipse extension [message #601687 is a reply to message #75225] Fri, 04 April 2008 02:32 Go to previous message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
Try asking his question on eclipse.newcomer. Offhand, I don't remember
the magic to do this, but somebody on newcomer probably will.

Wayne

On Thu, 2008-04-03 at 07:04 +0000, Trushna wrote:
> Hello everyone,
>
> I need to load one .properties file through eclipse extension.
> Extension element details allows to contribute a file(non java) to the
> extension using 'resource Type'. But i donno how to load it in the code.
> I tried createExecutableExtension thinking it will give me object of that
> file(IFile) but it didnt work.
> Can anyone help?
>
Re: Loas resource through eclipse extension [message #601722 is a reply to message #75246] Tue, 15 July 2008 05:26 Go to previous message
trushna is currently offline trushnaFriend
Messages: 24
Registered: July 2009
Junior Member
I made it work this way:

just got name of the file/resource through extension.

and then loaded the file in my code using:

Bundle bundle = Platform.getBundle(extensions[i].getNamespaceIdentifier());
URL url = bundle.getResource(<name of the file>);

Thanks for the reply.
Previous Topic:grouping swt Radio buttons
Next Topic:eclipse launch framework: retaining launch screen after clicking run
Goto Forum:
  


Current Time: Tue Apr 23 15:20:09 GMT 2024

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

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

Back to the top