How to create an existing directory in an eclipse project

I have a project that I am working on. I decided to try working with it in Eclipse. A directory already exists under version control, where all the code is located. I have a rather strange problem. I cannot find a way to start using the existing code directory as an eclipse project. All I can find is how to import an existing source into a new project or check the source of version control in a new project. How to create an existing directory in a project?

My project is a Django web application if this is any help

+74
eclipse
Nov 13 '10 at 4:24
source share
9 answers

In the New Java Project wizard New Java Project uncheck the box labeled Use default location and use the Browse button to find your directory.

+85
Nov 13 '10 at 4:31
source share
— -

This is pretty easy to do. Go to File-> New-> Project. In the project wizard, select the type of project you want, and then select the "Use default location" check box. Find your folder in the widgets, which will then be included. After that, click Finish.

Alternatively, you can create a new project workspace in a new location. Then, assuming Java is your type of project, you can open your project properties and add an existing directory as the source folder. To do this, use the Link Source button on the Java Build Path → tab in the Project Properties dialog box.

+18
Nov 13 '10 at 4:30
source share

My method:

I clone this file into a new project directory and rename Project-Name to my project name, after which I import new files and a directory from Eclips

File name: .project (Use Notepad to create this file ... select "Save As" in All Files (*.*) And write a file name, for example: .project )

 <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>Project-Name</name> <comment></comment> <projects> </projects> <buildSpec> </buildSpec> <natures> </natures> </projectDescription> 
+5
Oct 26 '15 at 6:59
source share

Probably not the way most people would, but I like all my eclipse projects in one place, but it’s not necessary that my source is in my workspace directory. There may be a built-in symlink method in eclipse, but sometimes I get a project folder in the workspace, and src is symbolically linked to the actual source directory somewhere else. This is my personal preference anyway. If you are also on a * nix machine, just

ln -s / path / to / source src

will do from your project directory.

+3
Nov 13 2018-10-11T00:
source share

We hope that this link answers the original question of this topic.

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-45.htm

Create Linked Resources

Folders and files can be associated with locations in the file system outside the project location. These special folders and files are called related resources.

To create a linked folder:

  • In one type of navigation, right-click the project or folder in which you want to create a linked folder.

  • From the pop-up menu, choose New> Folder.

  • Specify the name of the folder that will be displayed in the workspace. This name may differ from the name of the folder in the file system.

  • Click "Advanced."

  • Check the link for an alternate location (linked folder).

  • Enter the path to the file system or click "Browse" to select a folder in the file system.

  • Click Finish.

+2
May 31 '15 at 16:03
source share

You know, this is not an easy question. Depending on your type of project (jar, web module, ush, etc.) Different eclipse uses configuration and configuration files. So, the first really interesting question: what type of project do you have? The basic solution after it is to create a new project and determine the source code directory as the root of the project. Then you will see what else needs to be changed (for example, parameters of the source path, classpath, etc.). What does your project look like? Can you suggest a folder tree structure?

+1
Nov 13 '10 at 20:49
source share

Since you are using Django, you must first configure PyDev in Eclipse. You can install it from the market. Then you want to configure the PyDev Python interpreters to look for your Django installation ( http://pydev.org/manual_101_interpreter.html ). Be sure to provide an explicit path to the Django folder if your Django is not installed in the default location.

Once everything is ready, you can choose File> New> Other, then select PyDev Django Project from the PyDev subdirectory.

Click “Next”, and here's the sweetness: Uncheck the “Use by default” box (as mentioned earlier), and then find the Django project directory. Be sure to select the desired project folder ( manage.py .: the folder containing manage.py ). When you select the desired folder, Eclipse / PyDev finds out that the project already exists and mentions that it will use these files. Click Finish.

Then a database form appears that asks for the settings for your database. If you already have the settings.py file, then this does not make any changes (as it should not). So fill it or not. But this is the last step.

You can then view and use your existing project in Eclipse!

+1
Feb 20 '14 at 21:01
source share

I just created pom.xml manually and imported the project as an existing Maven project in Eclipse. It even works for nested projects without problems.

0
Sep 13 '16 at 14:27
source share

Use "import - existing projects into the workspace". This works for my case.

-one
Jan 11 '13 at 1:40
source share



All Articles