I imported a project into Eclipse and then deleted it, Now I am trying to import the same project once again, but Eclipse says Some projects cannot be imported because they already exist in the workspace. I'm not sure how to import that project now.
Right click inside Eclipse Navigator view then use Restore from Local History... option to restore your projects.
Related
What's the correct way to create a project in Eclipse from a github project which uses the parent/child pom construct, for example https://github.com/vladmihalcea/vladmihalcea.wordpress.com ?
I can clone/download it ok, but then do I need to manually create an eclipse project for each sub-project within or is there a better way?
(Googled the hell of out this question without finding an answer, but please feel free to post a link if you know of such.)
Use the Import feature of Eclipse.
Select File / Import ... from the Eclipse menu.
From the Import dialog window, Select the Maven / Existing Maven Projects wizard option.
Click Next.
From the Import Maven Projects dialog, choose the root directory using the Browse directory chooser.
With the directory choosen, the dialog will be populated with all available Maven projects. Check all the projects to be imported.
Click Finish.
I have project in GIT that I can see on my local repo through command line interface. Now when I try to import GIT project I still see it on 'Select a wizard to use for importing projects' but when I check 'Import existing project' and click next to next window called 'Import Projects' the project goes missing.
I also tried importing project both by creating new project and coping source into it and also by importing existing project option but some how source does not import in all the attempts.
Check if it has '.project' file. If no, you should create it somehow. For example, in gradle prjoject you can run 'gradle eclipse' command, for maven project - something other. If it is just clean java project - create new Java project in Eclipse, create at least one class and save it. After that you may close eclipse, and copy all source files from project that you trying to import to folder, where created class is placed.
I have imported an eclipse project to my workspace. While importing,I forgot to select "copy to workspace"check box. But now, I want those projects to be in workspace. Is there any way to achieve this without importing again.
Right click on your project in Package Explorer, Refactor, Move and select target location for your project.
I am trying to import a project into eclipse. First time I imported into the workspace. Then it had an error about .classpath was readonly.
So I decided not to import into my workspace but to access where it resides on svn. So I tried to delete it.
Now when I import from another location it says it cannot be done because it exists in the workspace. This eclipse problem has happened to me many times before. Do I need to manually remove the files from the workspace now?
More lunacy now the import project dialog cannot be closed! It imported a tablet project and now says must click cancel (already done). Way to go eclipse team!
Looks like your Eclipse didn't do a clean delete for your project. Before trying to import it again, close (or kill) Eclipse and go to this folder:
<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects
Look for a folder from the previous project (should have the same name). If there is one, delete it. Also delete any remains of the project from the workspace itself and try doing the Import again.
Yes. When you delete a project from Eclipse, it gives you the option of deleting the files from your workspace directory. By default, it is not checked.
I'm trying to open an existing Android project in Eclipse. I've gone to File > Import > General > Existing Project (or something like that). I've chosen the file project folder. But every time I try to open the folder, all I get is an error.
Some projects cannot be imported because they already exist in the workspace*
Is there any other way of opening my project?
You cannot import a project with a name already present in your current Eclipse workspace.
The surest way to work around that is to switch workspace (menu File / Switch workspace), and create a new workspace (in which you will be able to import that project).
A more complex solution would be to try and rename an existing project in your current workspace.
Check other causes in:
"Some projects cannot be imported because they already exist in the workspace error in Eclipse"
"Erased project from Project Explorer and cannot re-import it"
"How to import a project which you just deleted in eclipse"
I faced the same issue, But it is as designed. When people close the project, It simply makes the project unavailable in the eclipse project view. This is why people thinks that it has been completely removed from the view.
So All you have to do is to go to
Window -> Show view -> Project Explorer
Now you will see your project in the Project Explorer sidebar with a different closed folder Icon as shown in this image.
Once you right click and open project you will see the magic you are looking for.
I had the same problem and I solved it finally.
So, lets say you want to open "TEST" project on eclipse. And you project is in this path: C:\Users\Sabina Comp\Desktop then your workspace should be C:\Users\Sabina Comp\Desktop not C:\Users\Sabina Comp\Desktop\TEST.
You can switch workspace by going to File->Switch workspace->other
I hope it will help you!
Just delete the .project file and try to open the project again in Eclipse File Explorer :)
I faced the same problem. Maybe the cause of your problem is as simple as mine.
I closed (not delete) my project in the Java Browsing view. Unlike the Java view, the project becomes invisible in the Java Browsing view. So I thought I deleted the project. But turns out my project is still in use when I try to import it.
So I went to Java Browsing view and right click the blank space in the Projects panel, click Open Project and the project is back!
Right click on a working set --> properties.
You should be able to see all the projects that are available in your workspace. Select it.
Next all the projects should be listed in your working set.
Here's what worked for me:
Right click on the project > Source > Format
I guess you want to create a copy of the existing project and make changes to the new one. Or you have got a project whose name matches the name of the existing project and you want to import the new project as well.
In the first case , you just need to simply copy(Ctrl+C) and paste(Ctrl+P) in the package or project explorer in the eclipse and it will ask you for a new project name -- rather than copying the project folder in the windows explorer and renaming the project folder name.
If you have copied the project in windows explorer and tried importing the project in eclipse you will get the above error Or if u have got a project whose name matches the name of the existing project in eclipse also you will get the above error.
Solution for both -- is to delete the .project , .classpath and .settings files and import the project. It will successfully import if u have changed the folder name.
Tip: If its a maven project , you can import it as a Java Project and then RightClick on the project and Configure->Convert To maven project.
In my case, problem was -
I deleted the code directory from its location.
And at the same time I closed Eclipse.
So when I reopened Eclipse, it searched for project and couldnt get it.
I restored the code directory at original place.
Opened Eclipse.
When tried to import project again I found it in closed condition.
I opened it and it started working properly.