Tag Archive for 'eclipse'

Eclipse and Subversion over SSH

I use subversion for my version control - and I have recently had to set up Eclipse to access the subversion repository on my new server. This proved trickier than expected, largely because of bad instructions all over the internet!

Many of them provide instructions for setting up a tunnel in putty, or through TortoiseSVN. Both are unnecessary with the right Eclipse setup.

These instructions assume you have setup a repository on your SVN server, and have imported files into it. For instructions on how to do this, please go here:

SVN QuickStart

First, you need to install WebTools (WTP) and Subclipse in Eclipse. I use the PHP Development Tools (PDT) plugin to edit PHP scripts - the PDT 'all-in-one' package comes with WTP pre-installed. Instructions for installing Subclipse can be found here:

Subclipse Update

Once you have everything installed, open Eclipse and go to the Window... Preferences.

Navigate to Team > SVN and set 'SVN interface' to 'SVNKit (Pure Java)'. Click OK.

Now go to Window...Open Perspective...Other... Select 'SVN Repository Exploring' and click OK.

In the 'SVN Repository' window, right-click and select New... Repository Location.

The URL is in the format:

svn+ssh://username@server_ip_address/path/to/repos/username is the username you use to log onto your server over SSH
server_ip_address is pretty obvious.. I find IP addresses work better than domain names
/path/to/repos/ is the full filesystem path to the repository (e.g. /home/ben/svn/)

Click 'Finish' and you will be taken to the 'Enter SSH Credentials' page.

Your username will be pre-filled. Select 'Use password authentication', and enter your password. Ensure that the port information is correct. The default is 22, but if your server is behind a firewall it is likely to be something different. Check 'Save Information' if you want to, and click OK.

Eclipse will now load your repository in the 'SVN Repository' window. For instructions after this point, check out the SVN QuickStart (the link is earlier in the post).

Top Web Development Tools (Pt. 1)

Part 1: ApplicationsPart 2: Code Libraries/Resources

There are various tools that are indispensable to me, and I thought I'd share them with the world! A lot of them are fairly standard, but this is my blog, so these are my thoughts on them!

1. Eclipse with PDT

I write my code using the Eclipse open source IDE. I settled on this after many years of using a simple text editor, Textpad. I decided I needed a text editor with real syntax highlighting, autocompletion, variable recognition - features found in Zend Studio, a hideous and slow program.

However, for a long time Zend was the best PHP syntax highlighter I could find - until I discovered PHPEclipse, and later Zend's own PHP IDE (now PDT) plugin for Eclipse. I have never looked back. Eclipse is one of the few Java programs that actually works well, and fast. PDT is still in development, but 0.7 RC3 has just been released, is very stable (it has never crashed on me), and works well.

If you want Smarty syntax highlighting, that's a bit tricker. PDT doesn't support it, but PHPEclipse has some basic Smarty syntax highlighting, so I have two Eclipse workspaces - one with PDT, the other with PHPEclipse.

2. XAMPP

XAMPP is amazing. If you are a web developer using IIS or some other web server, stop immediately and download XAMPP. It is far easier to set up and use than IIS. And, it is contained entirely within a folder. That means, if you move around from computer to computer, you can stick your Eclipse, website and XAMPP files on a memory stick and have your website anywhere. All you need to ensure is that the memory stick is given the same drive letter everywhere you plug it in.

3. Firefox with Firebug

Javascript and Ajax debugging is revolutionised with Firebug. You can even use it to optimize the objects on your pages, as it details each page request, how large it is and how long it takes to load. You can use it in design, inspecting DOM elements and displaying their style information, even the layout, with margins/padding etc. It is simply amazing.

4. Colour Scheme Picker

If, like me, you find colour scheme inspiration difficult, you'll love this tool. Simply pick a random colour that you like, and it will give all kinds of suggestions for a colour scheme. I highly recommend it. Colour Scheme Generator 2.

5. Font Picker

Similar to the previous tool, but this one allows you to compare different fonts side-by-side. It also groups the fonts by operating system, so you can choose fonts that are included in all major operating systems. Typetester.