Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: How to add an existing source folder?

Tags:

eclipse

I have a directory called c:\RemoteSrc . Under this there are 3 directories which are currently source folders (I think? the icon is an open folder with a little orange grid in it) in my Eclipse project. I have dropped a new directory under c:\RemoteSrc which I also want to add to my project.

BUT

If I right click on my project and go "Build Path..." -> "Link Source" and try to add it it tells me "Folder already exists with a different case". Yes i KNOW that the folder already exists THATS WHY IM TRYING TO ADD IT.

like image 253
evilfred Avatar asked May 14 '10 23:05

evilfred


People also ask

How do I link to a folder in Eclipse?

To add a linked folder to your project, click File > New > Folder to display the New Folder dialog box. Click Advanced, select Link to alternate location (Linked Folder), and then navigate to the folder that you want to link to.


2 Answers

I think all you need to do is refresh the project. Eclipse does not automatically pick up folders (or files) dropped into it's project directory.

like image 117
Greg Adamski Avatar answered Oct 16 '22 12:10

Greg Adamski


A screen capture might help, but if the GUI is un-cooperative, you can:

  • close Eclipse
  • open the .classpath file which defines your project (it may be located in your workspace)
  • see if you can define a new classpathentry of kind "src": this is not the easy method, but that may give you an idea why the GUI refuses to define the same entry.
like image 5
VonC Avatar answered Oct 16 '22 10:10

VonC