Normal Folder in a Java project [message #144554] |
Wed, 15 October 2003 17:55 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02698 seconds