Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse plugin folder
eclipse plugin folder [message #116016] Mon, 25 August 2003 14:22 Go to next message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
hello together,

i'm wirting a eclipse plugin which creates an file in a project but now
i want to add it in a certain position in the folder tree.

how can i test if an specified folder exist in a certain project?

Or more generally how can i add a file to an existing folder structure?

thank you advanced,

-thijs metsch
Re: eclipse plugin folder [message #116083 is a reply to message #116016] Mon, 25 August 2003 15:15 Go to previous messageGo to next message
Chris Laffra is currently offline Chris LaffraFriend
Messages: 253
Registered: July 2009
Senior Member
Look at the API for IProject

public IFolder getFolder(String name); // returns null when folder
does not exist

Once you have the project, you can create new folders, or create a file in
an existing folder.

Chris


"Thijs Metsch" <thijs.metsch@dlr.de> wrote in message
news:bid630$q0t$1@eclipse.org...
>
> hello together,
>
> i'm wirting a eclipse plugin which creates an file in a project but now
> i want to add it in a certain position in the folder tree.
>
> how can i test if an specified folder exist in a certain project?
>
> Or more generally how can i add a file to an existing folder structure?
>
> thank you advanced,
>
> -thijs metsch
>
Re: eclipse plugin folder [message #117851 is a reply to message #116083] Thu, 28 August 2003 08:07 Go to previous message
Thijs Metsch is currently offline Thijs MetschFriend
Messages: 13
Registered: July 2009
Junior Member
thx again :-),

public IFolder getFolder(String name);

// returns null when folder does not exist

i'm not quite sure if it really returns null when the folder doesn'T
exist. It seems to me that it returns even a folder if it doesn't exist.
It returns a Path which leeds into nowhere.

Waht i do is:

IContainer con...

System.out.println(con.getProject().getFolder("test").getLocation().toOSString())

any ggod ideas or am i still making one stupid mistake?

thank you in advanced

-thijs metsch


Chris Laffra wrote:
> Look at the API for IProject
>
> public IFolder getFolder(String name); // returns null when folder
> does not exist
>
> Once you have the project, you can create new folders, or create a file in
> an existing folder.
>
> Chris
>
>
> "Thijs Metsch" <thijs.metsch@dlr.de> wrote in message
> news:bid630$q0t$1@eclipse.org...
>
>>hello together,
>>
>>i'm wirting a eclipse plugin which creates an file in a project but now
>>i want to add it in a certain position in the folder tree.
>>
>>how can i test if an specified folder exist in a certain project?
>>
>>Or more generally how can i add a file to an existing folder structure?
>>
>>thank you advanced,
>>
>>-thijs metsch
>>
>
>
>
Previous Topic:A multiple selection in tableViewer with mouse
Next Topic:test
Goto Forum:
  


Current Time: Wed Jan 15 14:07:21 GMT 2025

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

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

Back to the top