Where is “create project from existing source” in eclipse Indigo?

后端 未结 4 719
半阙折子戏
半阙折子戏 2021-01-01 08:48

I cannot find \"create project from existing source\" in Eclipse Indigo while I am trying to create a \"java project\". When I select Java project and then next window come

相关标签:
4条回答
  • 2021-01-01 09:43

    Un-check the Use Default Location option and then Browse to select the parent folder of your existing source tree. Eclipse will automatically detect the existing files and folders, although you might have to configure the project to let it know what your source folder is; but the New Java Project wizard presents that option to you.

    0 讨论(0)
  • 2021-01-01 09:43

    If your source directory is inside the current workspace, ERiz's answer won't work due to a bug in Eclipse. (It prints out the error "folder overlaps the location of an existing project"). Instead, you should leave Use Default Location checked and type in the name of the folder as your project name.

    See here for more discussion about the problem.

    0 讨论(0)
  • 2021-01-01 09:43

    So far it seems the only way to do this is the solution Antimony suggested.

    If you want to avoid typing in the folder name, untick "Use default location", select your source directory, then tick "Use default location" again and the Project name field should contain the name of the source directory.

    0 讨论(0)
  • 2021-01-01 09:48

    I came across this answer trying to import a Git project, so I will write my solution here. The workspace directory is the same as the Git's working directory, so I didn't want to move the project folder somewhere else.

    If you have a Git project you want to import, but Eclipse can't see it because it has not the .project file in its directory, here's the steps:

    1. File > New > Java Project: put in the name the name of the project's dir, so as Antimony said, the project will be automatically configured.
    2. You will see your project in the Project list, but it's not bound to Git yet.
    3. If it's a maven project, you can convert it to maven project now: right click on the project and select Configure > Convert to Maven project.
    4. Delete the project (DO NOT SELECT "Delete project from disk")
    5. Now you can import the project as a Git project from File > Import > Git Project
    0 讨论(0)
提交回复
热议问题