After the release of the Eclipse PDT (PHP Development Toolkit)'s All-In-One 1.0 build, I gave it a whirl, but found to my dismay that a Subversion client isn't included in the default install, though CVS is. It took me a few tries to figure out how to get everything working well with it, so I thought I'd share my experiences and save someone else the ramp-up time.
I'll outline a couple of wrong turns here, and then describe a way I found to make it work after the jump. Note I'm not saying it's the way, not with something as configurable as Eclipse. Also, I'm coming to it as an absolute Eclipse newbie, so some of my mistakes might be obvious to a long-time user, but I assure you aren't obvious if you are new to it.
First I tried making the workspace the place I'd been working previously, assuming Eclipse would recognize and import the files with a new project. Well, not so much. It seems a new project can import files, but not recognize pre-existing ones.
Then I tried setting up a new project in a new workspace, and importing the project I'd checked out with Subversion on the command line. That worked better than I feared. It pulled in .svn directories and the svn client works to an extent in the new file location. However, I got strange file locks and it turns out it didn't import all the files. That's when I stopped screwing around and turned to Google.
To work with Subversion within Eclipse, you'll need one of two major plugins: Subversive or Subclipse. I use one at home and one at work. Subclipse seems to be a little easier to set up on Mac OS X, as it doesn't require a non-default client. I also like its status icons a little better. It does blow my mind, though, that neither were included as part of the PDT All-In-One, much less Eclipse Europa as a whole. Subversion is pretty standard for open source development now.
Once you have a plugin installed, the rest of the process is almost the same for either one. Click on images to see larger versions.

Before you do anything else, even create a project, you need to import your project using your preferred Subversion plugin. Use File > Import... to do this.

Then, in the resulting dialog, find your plugin's import method. With Subclipse, it's under "Other," and with Subversive it's under "Team." Select it, then click Next.

Then either create or use a previous repository. This will vary a lot depending on how your Subversion repository is set up. I had previously set up my company's repository, so I'll use it here. Again, you need to explicitly select it and click Next.

Select the directory in your repository that has the branch you want to check out. Select it, then click Finish.

For me, the next step was critical. Choose "Check out as a project configured using the New Project Wizard." Otherwise, you won't get a PHP project with all the PHP-specific goodies that entails. Click "Next."

Then, fill out your project name and any settings and include paths as normal. When you're done, click "Finish."

A scary-looking dialog will appear, warning you if you have directories with the same name as some of Eclipse's special directories, Bad Things Will Happen. Unless you have lots of hidden directories, click "OK."

Finally, it will begin checking out the files from your Subversion repository to your machine. You can run this task in the background, but I find I rarely have anything else to do until it's done.

At last. Your project is set up. However, beware: at this point, if you do some configuration and commit your changes from the root level of your local project (done via right-clicking on the top project directory, choosing "Team" and then "Commit"), Eclipse will automatically add any directories it's created to your repository! Unfortunately, in the default PHP Explorer view, you can't see these files. You can, however, see any files you want to use in your local copy without versioning.
The solution is to click to the Navigator tab, where you can see Eclipse's hidden metadata directories.
Right-click on each directory, choose "Team," and then choose "svn:ignore" as shown here. Repeat this and the next step for each directory and file you don't want versioned.
Choose "Restrict by name" and click "OK." Remember, do this for all files you need to keep unversioned before your first commit, or you'll be sorry.
That's it! You're now ready to develop as you would with Subversion and Eclipse in PHP.
Congrats to CollabNet! Subversion, the open source versioning tool written as a "compelling replacement to CVS", was named by developer.com as the Product of the Year 2008. We've been using subversion for our work for over a year now and its proved to b
Tracked: Jan 22, 15:17
clipse is an open source IDE — or as they put it themselves: “universal toolset for development”. It is probably the most flexible development environment out there right now, with plug-in support for all major languages. I have used ...
Tracked: Jun 09, 08:58