before
My project window looked like the picture above and I liked it.
now
But now it shows EVERYTHING in my Desktop directory.
I want the project window to show only the files in "core" folder but I can't find out how to change the settings.
Go to the File Menu in the top-bar, select Open Folder... and select the project Folder you want to open.
If you want to create a new project click on new and follow the steps.
Looks like your Desktop directory was opened and indexed in the IDE. To fix the problem you can try to do:
File | Close Project.
Close the IDE window.
Delete all .iml files and the .idea directory from both Desktop and core folders.
Re-import your project in IntelliJ as per https://www.jetbrains.com/help/idea/gradle.html#gradle_import_project_start .
I am using eclipse and I moved some projects(Projects with the name Mc Bot) in my workspace to another folder. However, when I open eclipse with my workspace, projects still appear like this in package explorer.
How can I fix that?
You cannot move project folders on your hard drive and expect Eclipse to update automatically. The folders contain metafiles that Eclipse needs to properly load the workspace on startup.
It is better to either rename/move the projects within Eclipse.
Or to remove and then re-add them to Eclipse's project management.
However, make sure to not accidentally delete the files from disk, when removing the old project from Eclipse. There is a checkbox within the confirmation dialog that - in this case - you should not check.
Especially when you are working with a code versioning system (such as Git or SVN), it is important to rename your files and folders within the code editor. Otherwise your repository might get out of sync.
I would just delete it here in eclipse (don't mark the checkbox to delete on disk) and then reimport it. So in this view from the screenshot just open the context-menu, say import and chose your projects again.
I am trying to import a project that me and my co-worker have been working on.. and keep getting this error after I select-- "import" then "import existing project" then click archive file, and then I click next, and this error comes up:
Some projects cannot be imported because they already exist in the
workspace
Uncheck the "copy projects into workspace" checkbox, and then click "refresh" button, you will be able to import the project
go to .project file in your project and change the name of the project in name tag
It has just happened to me too. Finally I realized that the project was already open in my workspace but it was not visible because of the selected working set. You have just to deselect the active working set and all opened projects will become visible.
This usually happens when you change the project directory physically without first delete in Eclipse.
You can view and delete these hidden projects in the following view:
Window -> Show View -> Other -> General -> Navigator
Then simply just continue with the process of import existing project.
In my case, I copied one of the projects (say 'Project1') from the workspace and pasted it to the same workspace. After that I modified the name of the pasted project (say to 'Project2'). I could not see it in the repository.
The main reason was .project file from the new project still had:
<name>Project1</name> instead of <name>Project2</name>.
So, I did following things in order to get the issue fixed:
Cut and paste Project2 outside the workspace
Change .project file to have <name>Project2</name>
Try importing Project2 again.
It worked for me.
You may have a project with same name in your workspace. Try to refresh (file->refresh) your workspace after deleting the another one with same name.
A typical situation occurs when you want to re-import a deleted project.
Projects in the Eclipse workspace must be unique. Note though that the project name need not be the same as the directory/folder name of the project, so you can either delete any existing project with the same name or alternatively rename the existing projects.
You have one occult directory named ".metadata" in workspace directory. Close Eclipse, delete ".metadata" and open Eclipse. When eclipse ask you about workspace make sure that ".metadata" isn't in workspace directory and click "ok" button to select default workspace.
Maybe you get the same project name in your '.project' file,check it,if yes, rename another name.than import again
If you've arrived at this because you have cloned a git project into the existing workspace and now you want to promote that workspace to a full fledged project then you should use the 'Git Repositories' view -> select 'Working Directory' -> Import Projects -> Existing projects.
Check if you have configured Eclipse to show ALL the working set. I once encountered exactly the same problem and it turned out I accidentally imported the project into the Other Projects working set. And my Eclipse configuration didn't show that working set in the package explorer, which lead me to believe that the project was not imported yet.
Updated for #Mawg:
First, click the Select Working Set...:
Then, choose No Working Sets:
This will effectively disable the working set and show all projects.
Try to rename the value of <name> tag which inside ".project" file of your project.
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Rename this value</name>
<comment></comment>
<projects>
This will work for sure. Here you are just renaming your project.
EASIEST WAY: Right click on the project (folder that reads "MainActivity") go to Refactor -> Rename and you will get a text field allowing you to rename your project.
If you get an alert saying your project is out of sync with the filesystem press F5 (refresh) and try again.
Take a look in your workspace folder, you may have an old project there with the same name as the one you are importing (even though it's not being shown on eclipse).
When you delete a project on Eclipse, if you don't check the checkbox on the dialog, it just removes it from the view and doesn't delete the folder on the workspace directory.
In my case i had deleted the resources directory from my .metadata.plugins:
Go to your workspace
Enter .metadata.plugins
Delete : org.eclipse.core.resources directory
Another way I just found!
MOVE the project to some other folder and then import and if required copy to workspace
I had this issue when I deleted a project and tried to import the code again. Eclipse never really deleted the project and still held a reference to the project name/folder in the workspace. I had to created a new project with the same name and my code appeared as it was. I believe this only worked because the project path was never changed.
It was happened to me when
I delete project from eclipse Project Explorer and not checked the
remove content from disk.
Next time when I tried to import same project in workspace then got same problem.
To solve I just did FYI work that every kid can do :)
So How I solved it:
Cut Ctrl + x myProject folder from eclipse workspace to other location ie Desktop
Right Click Navigator (you can get it from Window > Show View > Navigator) and Refresh (it will prompt following dialog)
Just click Yes button and move your project folder back to eclipse workspace directory
Import again!
Now Rock 'n' Role
This warning means you just deleted project from navigator, but the project is present in the working set. Or else your working set has project with same name, so go to work-space directory and delete the project which has the same name and import again.
This worked for me.
File > New > Android Project > Create project from existing source
Location = the location of the project you want to import.
You will get a warning "An Eclipse project already exists in this directory.
Consider using File > Import > Existing Project instead." But you will be able to click "Next" and the project should in effect be imported.
In eclipse click file then select switch workspace then browse and select another folder. Now repeat the same process and this time there will be no error :)
I had a similar problem, I have the same repository I wanted to import twice. I renamed the existing project by right clicking on the project > refactor > rename then imported it again.
My problem was a little bit different.
For example, the project name (what I see) was FooProject and in the imported project, I was looking for the FooProject but I could not. However, Eclipse does not let me import that project because he claims that it is already imported. And then, I have looked at the .project file of the project and I have seen that the actual name of the project was not what I see (FooProject).
The conclusion;
The name of the project (what you see in Eclipse) may be different than the actual name of the project (what maven see). Because of this reason. Please be sure that they are the same name by checking .project file of the project.
Nothing about could not solve my situation. This is how I solved.
Close the IDE
Remove the same name project form workspace
Start the IDE
Clean all project (not sure this helped)
File > Import > Existing Project
click refresh button
import project
Done..
At least on Eclipse Juno, you can toggle on Advanced. Then select [groupid].[artifactid] from the Name Template dropdown. That should make your project uniquely named. (If you keep multiple versions of a given artifact, you can select [groupid].[artifactid].[version] instead). Be sure to click the Refresh button so the changes are visible. Wash, rinse, repeat as needed.
delete it from eclipse......u might have closed the project in eclipse by "(Rightclick)-->close project".....so even if you delete this project from workspace folder....it stays there in eclipse IDE as closed project.....you should delete it from Eclipse IDE...!!!
I have a slightly different situation whereby my eclipse stops responding and I have had to kill the session. After restarting Juno, then the particular project I was working on disappeared although .project file exists. Trying to import back into Eclipse would yield the same "Some projects cannot be imported .." or "A project with this name already exists" if trying to create a new project.
In the end, since I was using Working Sets, I managed to find this file .metadata.plugins\org.eclipse.ui.workbench\workingsets.xml. Manually added the missing entry and restarted eclipse and voila, it came back.
I had the same error because there was one more project under svn in workspace but with another name. So I've removed it.
This is what i have noticed for the above issue :- If the checkout folder (folder where your pom project resides) is same as the eclipse workspace folder then i am getting this issue
SOLUTION
when i used a separate workspace folder for importing the project, eclipse did worked smoothly :)
In case you are using Maven, make sure that your artifactId in pom.xml does not have the same name as any existing project name in your Eclipse project explorer.
I checked the src folder (inside the same folder that I have my eclipse folder in) to make sure all the class files were there. There were none, in fact it looked completely different and out of sync from my project.
Is there some other folder or place where eclipse keeps my code ?
By the way, I use Mac. Also, don't think it should be a problem but I keep my eclipse application on a flash drive (the actual install location for eclipse is on my computer, though).
Right click on your code base in eclipse & select properties. In the properties tab you will find the disc location of your project.
When you first setup eclipse you are asked to choose a workspace. The workspace is where your code is saved. If you right click on your project and click properties, in the resource section there is a spot labeled Location: The file path there is where that project is saved. (It will be under your workspace folder)
I am not that used to changing workspaces in Eclipse, in fact, I only have one workspace. But right now, there is a need to change workspace and organize different projects but I don't know how to do it.
I saw something about refactoring and simply importing projects but I don't want the outcome of that.
Currently, I have C:\Users\krato\workspace\ as my default workspace and I want to create another in D:\dev\. So I created one using File > Switch workspace > other > D:\dev\. And in that workspace I imported some projects from the prevoius workspace. Yes I already see the projects in the dev workspace but when I open the other workspace (C:) I still see the imported projects and the folder (C:...\workspace) still contains the projects. What I want to do is to transfer the projects in a different workspace and in a different folder, which in my case D:\dev.
I tried to refactor but it says that it overlaps with the workspace location.
Please suggest the best way to do this.
I would also like to ask your recommendations whether I should have a same workspace and projects folder (like what I want to do) or different directories for my workspace and projects folder.
Your project folders don't need to be where your Eclipse workspace is. In fact, I would recommend to keep them separate:
Your project folders contain the project's code, together with Eclipse .project and .classpath files.
Your workspace on the other side contains Eclipse settings for working with your projects. It can contain multiple projects, and a project can be contained in multiple workspaces.
In your example, I would recommend to manually copy or move your code to D:\Dev, create a new workspace in C:\Users\krato, e.g. C:\Users\krato\workspace-dev, and then import your projects there using Import existing projects.
I would recommend moving rather than copying. If you really need a second copy of your project, consider using a version control system such as git and create a branch instead.
To achieve what you want, you need to do the following:
Create a new Eclipse workspace (like you have done already)
Import the projects you want to move using File/Import/General/Existing Projects and select the check box "copy projects into workspace"
Delete the now copied projects from the original workspace in Eclipse and select the check box "delete project contents on disk"
After that you will have completely moved the projects from one workspace to another, including the underlying folders.
I would also like to ask your recommendations whether I should have a same workspace and projects folder(like what I want to do) or different directories for my workspace and projects folder.
It depends on your own preferences and, how the projects are going to be used. I prefer to have my main project folders separate from my workspaces, because some of them will reside on either SVN, GIT or also Dropbox. Especially library projects, that might be used by more than one other projects, are better kept in a separate workspace and/or folder. This allows one to keep the overview and one can simply include these library projects in other workspaces when needed.
If you didn't delete the projects from the first workspace, they will still be there. Did you copy the files from C: to D: or move them? If you copied them to D: and you don't want them on C:, delete them from C:. But make sure they really are on D: first.
Or am I totally misinterpreting your question?
I believe I had a related problem, and conquered it.
I needed to move my entire workspace (containing my project directories) to a different drive, on Windows. If one wanted to move only some projects, and keep the old workspace as well, this could be modified simply by deleting projects as desired.
On http://www.eclipse.org/forums/index.php/t/248863/
nwbeeson had written:
Thank you. Here is exactly how to do this from a friend who is an
Eclipse expert.
1. Open Eclipse and switch to Workspace1 using Switch To Workspace...
2. Check the projects in Workspace1
3. Switch to another workspace to make sure that Workspace1 is closed completely by Eclipse (Critical step!)
4. Quit Eclipse
5. Copy Workspace1 and name the copy Workspace2
6. Copy Workspace2 to a USB flash drive
7. Copy Workspace2 from the USB flash drive onto the hard disk of a different computer
8. Open Eclipse on the new computer
9. Switch to Workspace2 using Switch To Workspace...
The projects open normally from Eclipse on any machine as though that
workspace had been there all along. The critical step seems to be
switching to another workspace before quitting Eclipse. If you skip
that step the copied and transferred workspace does not open
correctly.
This worked perfectly. Without the critical step, Eclipse balked at the new workspace location. All sorts of references to old paths are used, and apparently updated only if the workspace was fully doubly hyperbolically closed prior to the copying of the workspace to a new location.