Adding Project code to Eclipse

This page was created as a reminder, for how to add code that you currently have in your "non-eclipse" directory tree and access it as an Eclipse project.

As a user trying to access code that I downloaded from subversion into my development directory, I found no other way to make this happen. However, feel free to augment this page if you have a better way. This page applies to Eclipse versions 3.4 to 3.6.

The idea is to create a dummy project with a similar (or the same) name. Copy the project files from this dummy project into the real project. Delete the dummy project and import the real project. These are described in detail below.

  1. Go to File->New->Project
    • Select the type of project you want and hit "Next".
    • Check all the settings (e.g. for a PyDev project make sure it's using the right version of python).
    • Uncheck the "create a new 'src' folder..." option
    • Give the project a name this is the same or similar to the project your are trying to add, that is NOT in your Eclipse path.
    • Click on Finish
  2. Go to this directory within the Eclipse workspace, copy the (dot) project files, e.g. ".project" and ".pydevproject" for a python project, and put them in the root directory of the project you are trying to include.
  3. In the Eclipse Navigator, select the newly created dummy project (the one you just created) and delete it. It will not delete your source since that is not in the eclipse path.
  4. Go to File->Import and select "Existing Projects into Workspace" and hit "Next".
    • Browse for the real project root directory - into which you just copied the files ".project", etc. - and hit OK, and then FINISH.

That should do it.

Last modified 8 years ago Last modified on Jul 8, 2011, 5:40:39 PM