Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Normal Folder in a Java project
Normal Folder in a Java project [message #144554] Wed, 15 October 2003 17:55 Go to next message
Eclipse UserFriend
Originally posted by: mchacher.yahoo.fr

the question is very simple.
I want to create a normal folder inside a java project but only packages are
created with the standard api :
IFolder folder = project.create(path to myfolder);
folder.create(...);
Thank you for your help.
Re: Normal Folder in a Java project [message #144827 is a reply to message #144554] Thu, 16 October 2003 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

exquisitus wrote:

>the question is very simple.
>I want to create a normal folder inside a java project but only packages are
>created with the standard api :
> IFolder folder = project.create(path to myfolder);
> folder.create(...);
>Thank you for your help.
>
>
>
>
In a Java project where a folder is on the project's build path the
folder is the underlying resource of a package fragment. Above code will
create the folder but you will see it as package fragment (assuming the
folder or its parent is on your build path).

Dani
Re: Normal Folder in a Java project [message #144915 is a reply to message #144827] Thu, 16 October 2003 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mchacher.yahoo.fr

I agree with you. My Folder is a package fragment but I can't understand how
to modify it.
I want this folder to be a source entry as specified in the eclipse JDT
documentation.
I create an src folder and add it to the source entry :
IClassPathEntry srcEntry = JavaCore.newSourceEntry(new
Path("/MyProject/src");
However an exception is throwed with the following message :
JavaModel Exception : Java Model Status [ Cannot nest 'MyProject/src"
inside "'MyProject'. To enable the nesting exception exclude 'src/' from
'Project'.]

Thank you for your help.
Re: Normal Folder in a Java project [message #145125 is a reply to message #144915] Thu, 16 October 2003 18:26 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO--SPAM.us.ibm.com

That is because your source path is already including the root (project
level) folder, and so your new folder is already within the source
folder. You need to first remote the project root as the source folder.

Rich
Previous Topic:Imported java project, but cannot build
Next Topic:BUG? EditorPart is created, but no ActivePage on window
Goto Forum:
  


Current Time: Thu Nov 07 12:26:15 GMT 2024

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

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

Back to the top