Loas resource through eclipse extension [message #75225] |
Thu, 03 April 2008 03:04  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04919 seconds