You are here

ANNOUNCING: Drupal 7 Ruble For Aptana Studio 3


Lately I have been growing tired of NetBeans. While the IDE still remains strong, the lack of support for the Drupal module has left me a little frustrated. I have been keeping it updated for the public when NetBeans releases new versions, but this is about the limit of my knowledge when it comes to NetBeans development knowledge.

I also found myself switching between NetBeans and Eclipse more and more. Eclipse offers far more features, like the Remote System Explorer, which I find an invaluable tool.

When I first started seeing the features of Aptana Studio 3, I got excited. That excitement was nothing compared to when I saw the feature of “rubles” in the upcoming release. Rubles are Ruby files, based closely off of TextMate bundles, to extend the IDE through scripting. I noticed a lot of great rubles included for things such as PHP, HTML, jQuery and even Wordpress. One thing was missing though – Drupal. Well that is no more.

I have decided it was time for a decent development tool for Drupal 7, so I decided to start learning the Aptana ruble system and have developed a ruble just for Drupal 7. Installation is very simple:

Download and install the latest version of Aptana Studio 3 (currently in beta, though appears to be very stable)

Download the ruble from GitHub.

Copy the drupal.ruble folder to your Aptana Rubles/rubles directory. This varies depending on operating system:

  • Windows Vista and 7 - C:\users\{your username}\Aptana Rubles.
  • Linux/Mac – ~/Documents/Aptana Rubles/

So what exactly does this ruble do? So far I have hooks, themes and help in it.

Implementing a new hook or theme function

To implement a new hook, simple right click in your module file, select

Commands –> Drupal 7 –> Hooks (or theme) –> {category} –> {hook}

(I separated hooks into categories based upon their module. For theme implementations, they are split alphabetically. I decided to do this so we didn’t get menus with a couple of hundred items.)

Select your hook and the code block will be inserted into your file, with hook_  (or theme_) being replaced by your module’s name.

You can also insert hook or theme functions by typing out hook_ or theme_ and then hitting the tab key. A popup will appear with the list of available hooks or functions. This works as an autocomplete, so typing hook_men + tab will insert a hook_menu block. This is much quicker than the NetBeans version, where you need to go into the palette and select your hook.

Context Sensitive Lookup On

If you highlight a hook or internal Drupal function, you can access the page for that selection, even if the hook is prefixed with your module’s name. Simple highlight the complete function name and select:

Commands->Drupal 7->Documentation for Selection (Drupal 7)

An internal browser window will open up to the appropriate page on This was something I always thought would be nice in the NetBeans module.

I have released this under the GPLv2 license (same as Drupal) and will keep this as an open source project. I feel it’s time for Drupal to have a great tool out there to help expedite the development procedure. The project is being hosted on GitHub, so if you want to contribute, please contact me and I’ll give you access.