Easily Open Existing Non-Eclipse Project in Eclipse? - eclipse

Alright, this has caused me enough grief. The answer may be dead simple, but I need some help.
I figured it would be simple to open an existing project in Eclipse, but I'm having quite a time actually making this work. I don't want to change where it's located. I don't want to pull a bunch of strings to get Eclipse to point to it. I just want to take the project directory from where it is now and open it in Eclipse.
Is there any way to do this?

Not sure that I entirely follow, but here's my general routine for creating projects in Eclipse.
I go to File > New > Project and
pick out what sort of project I
want, and hit Next.
I enter the name I want to use for
the project, and the path where I
want to store it. I never store
stuff in my workspace folder.
For projects with existing code, I
just put the path to the existing
folder, and Eclipse just imports the
code.
Hoping that answers your question, but if not let me know.

Related

Eclipse: How do I restore the original project structure?

After checking out a very old commit of a project, I checked back out to the current state of the project. However, this somehow messed up my directory structure in Eclipse. Here is what the structure was before (and what I need it to be now):
And this is what it currently looks like:
So here are my questions:
Is there some quick and easy fix to get the directory structure back to how it was? It seems like Eclipse still "remembers" what the structure looked like, but misinterprets it.
Why did this happen in the first place and how can I prevent it form happening again? A few others I know had the same problem (which made them promptly switch to InelliJ rather than fixing the issue).
Thanks in advance!
It seems that the project folder is wrongly set as source folder.
This can be corrected in Project > Properties: Java Build Path, in the tab Source: select the source folder Quoridor, click Edit... and enter src.

Eclipse: Is it Possible to Open Files that are in a Workspace But Not in a Project?

I have a folder hierarchy that looks like this:
- workspace
- some_folder
+ eclipse_project
Is it possible to open and view the hierarchy in the project explorer of Eclipse beginning at "some_folder," instead of at "eclipse_project?" If so, how is this accomplished? When I try importing, Eclipse obviously refuses to because the files in the outer folder are already in the workspace.
Or does this contradict the principle behind Eclipse and projects?
Thanks.
Or does this contradict the principle behind Eclipse and projects?
Yes, it does. The File menu does offer to let you Open File..., but whether it's supported by an editor and how much functionality is retained is entirely up to that editor. Some will flat-out fail.
As a workaround, you can create a New General->File, expand the Advanced section of the wizard, and set the new in-workspace file to link to the real file's physical on-disk location, as long as that location is not in some way under the workspace's location. Note that even this may not always be supported by extremely old editors.

-eclipse- I can not Find the layout xml in the layout folder

I start Eclipse after a long time. I had tried to make an Android application project and made all the options right but when I open ( res/layout ) there is nothing there. Every application I made in the folder is empty!
That's because it's not created by default. If you need an XML folder, you'll need to create one.
It should be pointed out that it's not really necessary. It's just a matter of helping you keep your stuff organized.

How can I tell what dependencies a project has in Eclipse

I had a folder that contained a lot of projects, and imported them into Flash Builder/Eclipse.
I want one of these projects, and I'd like to remove the irrelevant projects from the workspace.
If I remove everything but the project I want, I get errors in the one I want, so it must have been dependent on something.
However, I have no idea what this project is dependent on. How do I find out?
First, close all your projects (select all, right click and then close). Then, select the project you are interested in and open it. You will be asked if you want to also open the dependencies. This will allow you to see what's needed. You can then delete the projects that weren't opened.
Flash Builder and Eclipse both give the option to close unrelated projects. Simply right click and select "Close Unrelated Projects". Delete those that were closed.

How to automatically import eclipse editor preferences that were previously exported?

I have a similar problem to this guy: Importing/Exporting Project Preferences, but my problem is worse, I need to create a new workspace (i.e. new base directory) for every program or version that I work on. I have some common preferences (formatter, font size, etc) that I have exported to a file, which I then import every time I create a new workspace, but would like to skip the step of manually importing the .epf file. Has anybody seen an easy way to automate this?
EDIT: to help potential respondents answer the question, here is my workflow for handling a bug patch. Perhaps I'm doing something wrong in general that you could correct (since I've only been using Eclipse for a couple of years and tend to prefer emacs so I haven't spent a lot of time learning new Eclipse features)?
Create new directory for the workspace.
Start Eclipse editor and open clean workspace.
Check out a CVS directory containing .psf files for the various programs (necessary because of a pre-existing CVS tree structure that does not play nice with Eclipse).
Use team import on the .psf file associated with the program I'm working on to pull in the necessary projects.
Switch all projects to the branch tag associated with the release in question.
Work...
I think that Workspace Mechanic solves all your problems.
http://code.google.com/a/eclipselabs.org/p/workspacemechanic/
copy your original workspace. Easy, reliable, but will also copy all your projects.