Pete's Log: eclipse + tm rse + pdt
Entry #1720, (Coding, Hacking, & CS stuff)(posted when I was 32 years old.)
For the past few years, anytime I've wanted to work on any esgeroth.org websites, I've simply opened one or more ssh connections and edited the files directly in vi.
I decided today to take a step into the 21st century and see if I can't edit the files in eclipse. I installed Eclipse recently on esgerbeast because I wanted to play around with Android development. So I figured I'd check out what Eclipse can offer me. I found two plugins of interest: PDT and TM RSE. PDT is for php editing, RSE is for remote file system connections. I also decided, for whatever reason, to document how I got it set up.
I have eclipse 3.6.1, a.k.a. Helios installed. Installing PDT and TM was easy. I was able to install both via Help->Install new software... For PDT, I simply chose the Helios update site (http://download.eclipse.org/releases/helios/) and selected PDT from the Programming Languages section. For TM, I also found the site was already configured under available sites: http://download.eclipse.org/dsdp/tm/updates/3.2. Here I installed the basic package plus ssh support.
The next step was to define a site. I switched to the Remote System Explorer perspective (Window->Open Perspective) and defined a new connection with SSH Only as the remote system type. In the explorer, I then navigated via Sftp Files / Root to the location where my website files are stored. I created a new filter for the directory by right clicking on it and selecting new filter. I called this filter "www.esgeroth.org webpage".
I now switch to the PHP perspective. I create a new project and call it esgeroth.org. Inside this project, I created a folder that matched one of the folders on the remote system (let's call it testfoo). I then right click on the folder and say import... I choose Remote Systems/Remote file system, then browse and select my esgeroth.org connection and then find the folder under the filter I created earlier. I select the files I want and hit finish. They show up in my project.
I can now edit the files in Eclipse. However, they are stored locally now. So when I am done making changes, I need to export them back to the server. Again, I do this by right clicking the folder or file I want to upload, selecting Remote Systems/Remote file system, choosing my connection and desintation directory, and telling it to go. During the export, I told Eclipse to save the settings of my export to a file, and so it seems to remember at least my destination.
I need to experiment some more to see if I can reduce the number of clicks needed for an upload, but so far I am pretty content. I getting syntax highlighting and all sorts of other nifty eclipse features, and I don't have to have a bunch of ssh windows open. I will report back on my progress.
The next big improvement would be version control. I'll get there. :)