In Eclipse, how can I move all my source files to a different folder without screwing up the project?

Iain picture Iain · Mar 4, 2009 · Viewed 12.8k times · Source

I have created my ActionScript source files in a folder on a Mac (I normally use Windows), and somehow managed to make an Eclipse/FDT project that can see them.

I now need to move them into a svn checkout of an existing project to get them under source control.

I just can't work out how you do this without losing all references in the project.

I'm new to Eclipse and don't really understand any of the terminology (e.g. workspace). Does Eclipse have project files or are they all hidden? Can the project file be moved?

Help me stackoverflow, you're my only hope.

Update: From the FDT Flash Explorer window I can only seem to be able to move files/folders within projects that exist. Should I create a new project in the place I want first?

Should I move them from within Eclipse or from the file system? Do I need to setup a new workspace afterwards?

Answer

rogeriopvl picture rogeriopvl · Mar 4, 2009

The project folder has 2 hidden files: .project and .classpath that have all the info of the project. You just need to copy those files along with your project files.

For instance, you have a project folder in workspace/myproject/, and you want to add it to a checkout svn folder, you just need to copy the complete folder content to the checkout and then add all the files to the svn (including the project hidden ones) and finally commit.

From now on, when you checkout from that svn, you will have the eclipse project files, so all you need to do is create new project, and select the option that says that you already have a project folder with the source files (I'm not near an eclipse IDE to tell exactly the steps, but it's something like this). Eclipse will then import the project with all the settings you had previously defined.

I hope that this answers your question.