Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to get working plugin path
How to get working plugin path [message #274741] Thu, 28 October 2004 05:10 Go to next message
Eclipse UserFriend
Originally posted by: tanut.sanuk.biz

My plugin must have ability to access Components folder which contain
addition .class.
I would like to locate my Components folder as

[Eclipse path]\plugins\myPlugin1.0.0\Components\......

And now for in-development, I have locate Component folder as

[Eclipse path]\workspace\myPlugin1.0.0\bin\Components\....

now I get working path by
workingPath =
[pluginClass].getClass().getProtectionDomain().getCodeSource ().getLocation()
..getPath();

But I guess it isn't the best way to do. since I must export plugin as JAR
file when my plugin finish.
So are there other way to get it?
Thank you very much.

Tanut Apiwong
Re: How to get working plugin path [message #274790 is a reply to message #274741] Thu, 28 October 2004 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.nospam.inf.ufsc.br.please

You can get your plug-in's install location by using the following API:

* org.eclipse.core.runtime.IPluginDescriptor.getInstallURL() for pre-3.0
plug-ins

* org.osgi.framework.Bundle.getEntry(String) for 3.x plug-ins

Rafael

Tanut Apiwong wrote:

> My plugin must have ability to access Components folder which contain
> addition .class.
> I would like to locate my Components folder as

> [Eclipse path]pluginsmyPlugin1.0.0Components......

> And now for in-development, I have locate Component folder as

> [Eclipse path]workspacemyPlugin1.0.0binComponents....

> now I get working path by
> workingPath =
> [pluginClass].getClass().getProtectionDomain().getCodeSource ().getLocation()
> ..getPath();

> But I guess it isn't the best way to do. since I must export plugin as JAR
> file when my plugin finish.
> So are there other way to get it?
> Thank you very much.

> Tanut Apiwong
Re: How to get working plugin path [message #274822 is a reply to message #274790] Fri, 29 October 2004 02:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tanut.sanuk.biz

Thanks :)
but Will org.eclipse.core.runtime.IPluginDescriptor.getInstallURL() work
with 3.x system?

Tanut Apiwong ^_^
Re: How to get working plugin path [message #274843 is a reply to message #274822] Fri, 29 October 2004 14:53 Go to previous message
Eclipse UserFriend
Originally posted by: chaves.nospam.inf.ufsc.br.please

Yes, it is supposed to work. But it is not recommended for new plug-ins
that don't need to run on Eclipse 2.*.

Rafael

Tanut Apiwong wrote:

> Thanks :)
> but Will org.eclipse.core.runtime.IPluginDescriptor.getInstallURL() work
> with 3.x system?

> Tanut Apiwong ^_^
Previous Topic:View all open files in the navigator or explorer panel????
Next Topic:TreeViewer disable selection
Goto Forum:
  


Current Time: Sun Nov 03 12:20:29 GMT 2024

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

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

Back to the top