Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » File Path Problem in Plugin Development
File Path Problem in Plugin Development [message #522014] Fri, 19 March 2010 16:06 Go to next message
Yu Sun is currently offline Yu SunFriend
Messages: 58
Registered: July 2009
Member
Hi everyone,

I am having the problem of getting the path of certain file in a plugin development.

In the initial Eclipse, I created the plugin project - PluginA:

PluginA
- AcitonHandler.java
- file1
- file2

What I want to do now is that I want to access the file1 and file2 in AcitonHandler.java. However, I do not know how to get the relative path of the PluginA folder.

I checked some of the messages, but most of them are about getting the path in the runtime-eclipse environment, not the parent Eclipse environment. Therefore, the desired result is that when ActionHandler.java is triggered in the runtime-Eclipse, it can access the file1 and file2 in the parent Eclipse folder.

Thanks a lot.

Yu
Re: File Path Problem in Plugin Development [message #522316 is a reply to message #522014] Mon, 22 March 2010 05:06 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
I think, Class.getResource may do the trick.

Steffen

On 19/03/2010 16:06, Yu Sun wrote:
> Hi everyone,
>
> I am having the problem of getting the path of certain file in a
> plugin development.
>
> In the initial Eclipse, I created the plugin project - PluginA:
>
> PluginA
> - AcitonHandler.java
> - file1
> - file2
>
> What I want to do now is that I want to access the file1 and file2 in
> AcitonHandler.java. However, I do not know how to get the relative
> path of the PluginA folder.
>
> I checked some of the messages, but most of them are about getting the
> path in the runtime-eclipse environment, not the parent Eclipse
> environment. Therefore, the desired result is that when
> ActionHandler.java is triggered in the runtime-Eclipse, it can access
> the file1 and file2 in the parent Eclipse folder.
>
> Thanks a lot.
>
> Yu
Previous Topic:Override Command Binding
Next Topic:File Path Problem in Plugin Development
Goto Forum:
  


Current Time: Tue Mar 19 03:32:37 GMT 2024

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

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

Back to the top