eclipse workspace missing projects deleted file - eclipse

I'm using Eclipse Modeling Tools (Version: Indigo Service Release 2 Build id: 20120216-1857).
One of my projects in the workspace has disappeared from the Package Explorer (the View of all projects). Or better said, it is in the list, but it seems closed and when I try to open it, I get this error message: "The project description file (.project) for 'xxxxx' is missing. This file contains important information about the project. The project will not function properly until this file is restored."
What I really worry me: the project folder isn't available on the filesystem either.
I don't know why or how ... the only thing 'different' that I can remember is that I have switched the workspace to a new one, when that project was open.
Any idea to recover the folder/project?

Maybe you moved it by a mistake?
Check the other workspace (on filesystem) or maybe the project is in another project.
You should always do backup's or/and checkin in a VCS.
A recovery-tool can help, if the bit's are still there.
Good luck.

Related

Issues with Liferay 7.1 workspace imported from Github

I have cloned my Liferay 7.1 workspace from my Github repository. When I try to get Assistance in Liferay IDE using Control+Space, I get error:
This compilation unit is not on the build path of a java project
This happens on the new module project created in the same workspace(that was cloned from Github).
But when I create/import module from my local workspace that was created by Liferay for first time, this issue is not there.
I feel like there is some extra workspace setting that I am not doing in my Github workspace. Like we had to create build.username.properties in the SDK folder for Liferay 6.2. Totally stuck and no solutions anywhere.
I tried fixing Project Build path and Project Facets but did not help.
The way you did it in your own answer obviously solved it. My take on this is: The problem was most likely the .project file, because it contains all the configuration that eclipse requires, and the error message you post is an indicator that eclipse doesn't know what to do with these files.
The .project file can be regenerated from gradle settings, typically by choosing "gradle / refresh" (from memory, from the context menu of the project/workspace in Project Explorer), which will read the gradle settings and apply them to the eclipse world. This might happen automatically, but it might also need some manual push - next time you might want to try this, because just copying random files rarely is a good idea. You might end up pointing to other directories far outside of your workspace, and wonder why a local change is not picked up.
There were some differences between the workspace that I imported from Github and the one that Liferay was creating on my local. I opened both the workspaces in Beyond Compare. Following are the files that had major differences. I made them same and it started working after Gradle Refresh in Eclipse.
liferay-workspace/gradle/wrapper/gradle-wrapper.properties
liferay-workspace/.project
liferay-workspace/gradle.properties
liferay-workspace/gradlew
liferay-workspace/settings.gradle

Eclipse Error: Cannot determine URI for /project-path/

I'm running Eclipse Luna on Ubuntu 12.0.4 in VirtualBox with a Windows 8 host and every once in a while, I will boot up Ubuntu and open up Eclipse to find this:
My projects should be listed in the package explorer but it's all empty and whenever I try to import the project again, it says no projects are found.
At this point, I usually go to my workspace folder and delete the .lock file and rebuild the workspace but is there an alternative to this? This error happens every ~5 times I reopen Eclipse and it has become very annoying. Any help will be appreciated!
EDIT: Okay I just tried deleting the .lock file in the .metadata folder in my workspace and I'm still getting the same error. Any suggestions?
EDIT 2: While closing my currently open tabs, I got this error. The projects that were open were Maven projects if that makes a difference.
so I am a little late for the party, but I fixed that on reimporting my projects.
Under File->Import.. you choose General->Import existing Projects into workspace. On the next page you set your workspace directory as the root directory for importing, which will give you a warning like "Some projects already exist in workspace". Ignore this and click finish.
After that all my projects where back in my workspace.
Good luck
To solve this problem, I re-created my workspace and imported my projects again.
Creating a new workspace is done via:
File > Switch Workspace
This is not an optimal solution, but until Eclipse fixes these bugs, this can save you some time trying to debug your current workspace.
I previously had a very small number of Eclipse plugins installed. So, I quickly headed to the Marketplace and installed my plugins.
And yes, Eclipse's downfall is expected. I personally find IntelliJ IDEs much better.

One of my project subdirectories has disappeared from Eclipse PHP Explorer and refuses to reappear

The subfolder myproject/wp-content has dissapeared from the project explorer (of course the files are still there, I can see them on windows explorer).
All the other folders and files are still showing up.
I tried deleting the project files (.settings .buildpath .project) and deleting the project on eclipse and also deleting the index on .metadata/.plugins/org.eclipse.dltk.core.index.sql.h2
What else can I do?
I'm using stock Eclipse Kepler 4.3.1 SR1 64-bit with the following add-ons:
Aptana Studio 3 Plugin 3.4.2.201308081736-7W7I57boG98RAi489ctbvKi7VXbq com.aptana.feature.studio.feature.group Aptana
ChromeDevTools SDK 0.3.9.201309080643 org.chromium.sdk.feature.group The Chromium Authors
Chromium JavaScript Remote Debugger 0.3.9.201309080643 org.chromium.debug.feature.group The Chromium Authors
Eclipse Standard/SDK 2.0.1.20130919-0803 epp.package.standard null
Line Number Ruler Fix (Eclipse Kepler 4.3) 0.0.1 de.cdhq.eclipse.linenumberfix.kepler.feature.feature.group CDHQ.de
Markdown Editor 0.2.3 markdown.editor.feature.feature.group Winterwell
Nodeclipse 0.5.0.201309080643 org.nodeclipse.feature.group Nodeclipse organization
PHP Development Tools (PDT) 3.2.0.201306051924 org.eclipse.php.feature.group Eclipse.org
Show Window in Fullscreen 1.1.0.200906152252 gr.scharf.fullscreen_feature.feature.group Michael Scharf http://michaelscharf.blogspot.com/
Word Wrap Feature 0.0.3 de.cdhq.eclipse.wordwrap.feature.feature.group CDHQ.de
[EDIT] I forgot to mention I've also tried to rebuild the project with the same results, and I've also checked explorer view filters in case something weird had happened but there are no filters set.
[EDIT 2] I deleted the Eclipse project files and the whole .metadata folder on the workspace and recreated the project. I had no problem at first, but it has happened again. I haven't touch any settings, just closed and reopened the project.
[EDIT 3] The less invasive fix by now seems to be a combination of deleting h2 database (.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2 workspace folder) and deleting also the project without deleting its files which doesn't delete .build or .settings or .buildpath either, so it can be recreated without much hussle. I can avoid the problem by not closing the project (I can still close Eclipse without loosing the folder), but I still don't know what's causing it.
[EDIT 4] I updated Eclipse and plugins today to their latest versions (Now runnning Kepler 4.3.2) and the problem persists (even if I delete org.eclipse.dltk.core.index.sql.h2 and .settings, .buildpath, .project before importing the project's folder contents as a new project): I just close the project after eclipse finishes indexing it and when I reopen it wp-content doesn't show up any more (unless I force reindexing by deleting org.eclipse.dltk.core.index.sql.h2 again). I do believe this is WordPress related, since it only happens when indexing this particular WordPress deployment (maybe it's one of the plugins/theme files installed inside wp-content or something related to one of the xml files in the root folder, like sitemap.xml?).
For me this happened multiple times, on different project and different folders. Opening+closing or refreshing the project yield no success.
In my case, I have found out that this is related to the Working sets. It seems by default new subfolders and files of a project are not marked belonging to the set, so the project has a mix of old folders (included) and new folders (excluded).
There are two fixes I am aware of:
disable the working sets
Moreover, on large projects, having this mixed state working set made opening the folder structure (and other operations) very slow (3-5 seconds per level). Turning off the working set filter made it instantaneous.
edit the active working set and check the project's checkbox (which will check all subfolders).
This happens to me all the time. I'm on OSX and my projects are accessed from a mounted samba volume. I've found that if I:
open the project in eclipse
eject the samba volume
refresh the project (it will say it cant find it and ask if you want to delete
it... click no)
remount the samba volume
refresh the eclipse project
And the missing files/folders show up. If your folders are local, maybe just moving the project folder would do the same. Unfortunately, this happens very often, and seemingly more often for wordpress projects for some reason.
I'm working with a UI project (Dynamic Web Project) and my web folder keeps dissapearing too. I didn't knew what causes that.
The only thing I knew was how to reset my projet; deleting it from workpsace and reimporting it.
I know now what causes that but I have no answer on why it actually does it. I keep refreshing my workspace because I have some compressing that is done outside eclipse and for my workspace to update them I need to refresh... somehow, the freaking Close Project option is right under the Refresh option, without prompting... and this is when my folder dissapear; when I reopen it.
Try the Import Existing Project would be my guess!
Maybe that can help you find the how of it !
Hi i solve this problem by unchecking "Group by Namespaces" in the little triangle on the top-right of the php explorer.
Issue:
My app directory in my cake php application became invisible after some time. This is bad since all of my non-cakephp framework files reside therein!
My environment:
Macosx
Eclipse Kepler
WebServer: built in macosx in Library/WebServer/Documents which is symlinked to a dir in my home directory.
PHP plugin
What I tried first:
Deleted old project from UI ( retaining files on the file system )
cd'ed to root project directory and deleted eclipse artifacts like .settings, .project, etc
Recreated php project to find that the app directory is still missing!
What worked for me:
I renamed the directory from app to app_back using the terminal/linux command rn.
Eclipse immediate saw the new dir after a clean rebuild.
I renamed the dir back to app and performed another clean rebuild.
Et Voila
It seems that by upgrading Eclipse to last version (Luna), removing the project files (.settings, .classpath and .project) and creating a new project on a new workspace, I can close and reopen the project without having the folder missing from the project explorer.
It's not the solution I wanted (and don't need any more) but it's also a solution, so I'm posting it :-)

eclipse -restore missing projects

For some unknown reason the projects that I created in a workspace are no longer listed in the package explorer tab. The actual files of the programs still exist on the flash drive which was the designated workspace. How do I correct this problem so that I can access the projects in this workspace?
Are you in a different workspace? Try File > Switch Workspace or if you are in the right workspace already, you could try File > Import > General > Existing Projects into Workspace and re-import the projects.
Create new project on the menu, then select the button "Create project from existing source" and select your project directory on disk.
If you are working with Android projects, the straight import does not work. The fastest way I've found to deal with this issue is to move (not copy) the projects to a different location, then import them back into the workspace, making sure copying the files into the original workspace.
At this time, the Android eclipse plugin has a bug in it which will rename your projects to the package names, rather than using the "friendly" names you intended for the projects. Since eclipse quite often seems to drop projects in this way, this can lead to a great deal of frustration. If this bug is fixed, or you know of a workaround, I would appreciate hearing about it.
I had a case where my project disappeared from the workspace and when I tried to import the existing project into workspace, Eclipse reported the project was already in the workspace! So I simply created a new project with the same name/location as the folder in which the project was located. This brought the project back to life in my worskpace. This worked in Kepler version of Eclipse.
I found a way to resolve this issue without creating a new project.
My projects disappeared from the Package Explorer view when I was in the Java EE perspective. When I switched to the Java perspective, they reappeared in Package Explorer.
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
Not sure what caused this issue out of the blue and how long this solution will hold.
A simple solution that requires deleting the affected projects from your workspace, then importing them again:
Delete the affected projects from your workspace (do not delete from disk)
Open the files. File >> Open Project from File System >> Select location of files >> Select projects to open.
After you import them, it should work.
Try a refresh (F5) of the workspace.

Subclipse complains "Path is not a working copy" after moving workspace

I recently moved my Eclipse workspace directory and now Subclipse complains every time I open a file, dumping to the console something like:
Path is not a working copy directory
svn: '[original (pre-move) directory path]' is not a working copy
No such file or directory
This also happens when I explicitly try to view the history of a file. This persists across SVN cleanups, closing and re-opening Eclipse, etc.
Update, checkin, checkout and so on all seem to work fine, and Tortoise doesn't complain at all, so clearly it's not the SVN metadata that's screwed up, it's some Subclipse-specific metadata. Can anyone tell me how to blow this broken metadata away?
Edited to add: "Team > Disconnect" followed by "Team > Share" doesn't solve the problem.
Edited again to add: I've grepped through the whole .metadata directory and one of the project directories for a unique element of the old path and can't find it anywhere except in .metadata/.log (the error message itself) and some old Findbugs warnings. Very nice.
You need to delete the .syncinfo files. This is easily done (in most cases) by closing and opening Eclipse, however you can also do so manually as in the following:
To delete the cache, close Eclipse. The cache is stored in:
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects/PROJECTNAME/​.syncinfo
So you can just find and delete all files named .syncinfo in
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects
Quoted from this article: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=868799
I just did a "Team -> Cleanup" and this exact error went away! I also got this error because I moved between machines and the path wasn't the same.
Using Eclipse 3.6 and the Subversion 1.6 plugin.
Update in 2016: Still works perfectly with Eclipse 4.5.2 and Subclipse 1.10.
Edited to add: Nope, spoke too soon. This doesn't fix it. Some files just seem not to exhibit the problem.
The following seems to solve the problem:
Team > Disconnect.
Quit Eclipse.
Blow away .metadata/.plugins/org.tigris.subversion.subclipse.*.
Restart Eclipse.
Team > Share.
Not sure how the old path was actually being stored in the plugin prefs, but it must have been in there somehwere. It's kind of pathetic of Subclipse to store absolute paths, but apparently it is.
There's a bug filed on this, or at least on the same error message. No context. Fifty cents says it gets rejected.
I'm sure there are many causes with different solutions, but I found the one that worked for me at Dan Wilson's blog. Simply remove the offending folders from the workspace (probably saving them if they have new content), update (letting Subversion recreate the folders), then move the contents back into the fresh folders in your workspace.
I got the error when I tried to rename a class by changing the case from DAO to Dao in Eclipse.
I had to rename it to something like Dao2 and then was able to rename it to Dao.
What worked for me:
Do a "refactor - rename" on the project => after that do it again to rename it back to the original name.
I was having the same error message using subclipse with javahl on a project that is out of the workspace directory. Changing to svnKit has resolved my problem.
Hard to say without further information.
Did you move the whole workspace or just the content?
Also, you can try creating new workspace from scratch and check out the whole project again.
Alternatively, you may try deleting the .metadata directory and relink the project again using File -> import -> existing project into workspace and then relink the SVN data through Team -> Share projects (with an 's'), or maybe just do this last bit after first disconnecting the project from SVN.
Right click the project folder : Team -> Update to Head
This will bring back the directory. Delete it again and Commit
In my case I had the folders of the projects in the Project Explorer and just had to reopen the project
For me, this error message was caused by an out-of-date installation of Subclipse, and the underlying SVNKit and JahaHL libraries. I have been using TortoiseSVN outside of Eclipse to manage my project directories, and my recent upgrade to the 1.8.x series of (Tortoise)SVN tools broke my working copies for Subclipse.
All I had to do to fix, was go to Help->"Install New Software..." and click "Add..." to add a new update site. I picked the latest update site for the latest release on http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA and upgraded Subclipse from there.
Then all my existing projects just worked, and I could reconnect to the one I had already tried disconnecting from without problems.
I have the same problem
I had a new project, added it to SVN. Then everything works as normal, until I try and refactor-rename any java file, I get:
move D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/Skbean.java D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/SkBean.java
Path is not a working copy directory
svn: Path 'D:\dev\sk_ws\ge-parent\ge-core\src\main\java\com\skillkash\ge\beans\SkBean.java' is not a directory
Now the SVN URL is:
svn://qnap/share/MD0_DATA/svn/sk/ge-core/trunk
and the repository root is:
svn://qnap/share/MD0_DATA/svn/sk
Obviously just sharing the project then trying to move a file using subclipe does not work - it must be a bug. I have to do all my refactoring outside eclipse, and hand edit all the files which are affected.
checkout the whole project to a temp dir, then I copied the first level .svn directory and replaced my working copy .svn folder with this.
http://blog.itopia.de/directory-svn-containing-working-copy-admin-area-is-missing/275
It woks for me.
I had added a png file to my project, but I got this error trying to rename or delete it. Cleaning and refreshing the project didn't do anything.
I went into the svn Team Synchronizing perspective, right clicked on the file and deleted it. That solved my problem.
Right click on the project and select Teams -> Switch to another Branch/Tag/Revision.
Select the appropriate Branch/Tag/Revision that the project should be tied to and click OK.
Give Eclipse some time to process the changes.
Restart Eclipse for the changes to take affect.
I just got this error when I was trying to update some .java files. The problem was I was trying to update the files but the folder that contains that files didn't exist in the path so when I sync and update the folder it works at the first try.
So, dont try to sync files, try to sync the folder.
Sometime ago I had a similar issue. Seems that Subclipse (or Eclipse) stores the absolute path of your working copies. The cleanest solution is to export again your repository to the new path.
If you have non-committed code, then you can copy it on top of the clean export (without the .svn folder)
I too had this issue and I simply deleted the project from the workspace (leaving the files on the files system in tact).
I then imported an svn project into the workspace.
Import->SVN->Checkout Project From SVN.
I used my existing repository location to pull the files in.
This issue was caused when I changed Eclipse editions and used a Subclipse plug-in that was a version ahead of what I should have used.
I uninstalled the newer version and installed the correct older version and all worked well.