IDEs such as Dreamweaver can cost alot of money for the results they produce. As the web changed, a Java based-platform, Eclipse exploded onto the development scene. As Eclipse gained more popularity, communities formed and open-source editions that packaged it into a PHP IDE.
One of these IDEs is called Aptana.
This Howto covers downloading and configuring Aptana for PHP and Drupal development.
Download and Install Aptana from here:
http://www.aptana.org/studio/download
Configure Aptana for PHP Development:
- Go to Window->Show View->Plugin Manager
- Under Feature Plugins, select PDT SDK. For
minimalists, you can choose to select only the Runtime
sub-checkbox. - Click the Next button
- Confirm the items you are installing and click the
Next button once more - Accept the terms and conditions and click the Finish
button - After the install completes, click Yes when asked to
restart Aptana and wait for it to finish restarting
before continuing.
Customize Aptana for Drupal Coding Standards:
- Go to Window -> Preferences
- Expand the left-hand menu to General -> Editors -> Text
Editor: Enter2for Displayed tab width. - Expand the left-hand menu to Aptana -> Editors: Under Tab
Insertion on the right, clickUse Spaces.
Customize Aptana for Drupal PHP file extensions:
Unless you want all the source files you develop to look like Plain-Jane text files, an association for those files must be created.
The extensions that must be associated for Drupal that should probably be treated like PHP documents are:
MODULE,THEME,ENGINE,INFO,INC,INSTALL
To configure this do the following:
- Go to Window > Preferences
- Expand General > Content Types > Text
- Select PHP Content Types and add the desired types.
Restart Aptana for these changes to go into effect.
Next steps:
Create a new Project and create a connection to your development box.
Install Drupal Snippets or Druppets:
Snippets are a great way to save a bit of time when writing large amounts of code. In time, your collection may grow and you will have a custom library which will supplement your workflow.
To get started Download Druppets from here: http://timonweb.com/download-druppets.php
1. In any top-level folder of your Project View, create a folder named
snippets (if not already);
Note: You need to have a project associated to create linked folder.
2. Unzip content of snippets_here folder to the 'snippets' folder;
My path in Windows 7 is: C:\Users\Endor\Documents\Aptana Studio Workspace\snippets
3. Restart Aptana;
4. Activate Snippets View (Window -> View -> Snippets);
5. Find a Drupal 6 folder in Snippets View;