Aptana has long been my web-development IDE of choice, especially for building Drupal sites. It's extremely powerful out-of-the-box, it's free, and because it's built on Eclipse there are myriad plugins which add new functionality (SVN and git integration leap immediately to mind).
Configuring Aptana specifically for Drupal has always been a little finicky, however, so I'm putting together a series of quick tips to help optimize the installation / configuration process.
By default, Aptana Studio 3 provides syntax highlighting for most common web file extensions (HTML, JS, CSS, PHP, etc.). Any of Drupal's standard file extensions, however, .module, .theme, or .install extension is missing all of the syntax highlighting that (among other things) make IDEs so great to use.
Thankfully, we can configure Aptana to treat our Drupal files as PHP files, after which they'll always appear coloured and much easier to read.
- Select the "Window" item in the main menu bar
- Select the Preferences item in the dropdown menu
- Expand the General menu in the left-hand side of the window
- Expand the Editors menu in the left-hand side of the window
- Select the File Associations item from the expanded menu
- Next to the File Types list box, select the Add... button so that we can add our file type
- In the resulting field, enter an asterisk followed by a period followed by the file-extension you wish to add (e.g. '*.module')
- Select the Ok button
- With our new entry now added and selected / highlighted in the list of file types, select the Add... button to the left of the Associated Editors list box.
- Ensure that the "Internal Editors" radio button is selected and choose Aptana PHP Source Editor from the list. This will associate Aptana's internal PHP editor with our file type.
- Repeat the previous 5 steps for each file type that you wish to add (*.module, *.install, *.theme, etc.)
That's it! Your Aptana Studio 3 installation will now highlight the syntax of your Drupal files properly.