Skip to main content



      Home
Home » Eclipse Projects » Technology Project and PMC » Loas resource through eclipse extension
Loas resource through eclipse extension [message #75225] Thu, 03 April 2008 03:04 Go to next message
Eclipse UserFriend
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] Thu, 03 April 2008 22:32 Go to previous messageGo to next message
Eclipse UserFriend
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 01:26 Go to previous message
Eclipse UserFriend
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] Thu, 03 April 2008 22:32 Go to previous message
Eclipse UserFriend
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 01:26 Go to previous message
Eclipse UserFriend
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 May 20 19:35:13 EDT 2025

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

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

Back to the top