Aptana Studio Help > Getting Started > Developing with the Aptana PHP Plugin

Configuring PHP Preferences

Contents

PHP Editor tab

  • File Associations: Lists the file types that are opened using this editor
    • Edit: Make changes to the list of file types opened using this editor

Pair Matching

  • Highlight Color: select a color for highlighted text
  • Display options: (choose one of)
    • Do not highlight matching pairs
    • Highlight only matching element
    • Highlight entire pair
  • PHP Editor Mode: (choose one of)
    • Tabbed: Source and configured previews are shown singly (DEFAULT)
    • Horizontal Split: Divides the editor window into horizontal slices, one for the source and each configured browser preview
    • Vertical Split: Divides the editor window into vertical slices, one for the source and each configured browser preview
    • Source only: No browser previews enabled
  • Display HTML Toolbar: on/off

Default Content

  • Default PHP filename: Suggested string used when you create a single new PHP file
  • Create project file in new PHP project: Whether new PHP projects get an index.php file created in them
  • PHP project file name: Name (default is index.php) used if the Create project file option is enabled
  • Show content of simple PHP nodes in outline: on/off
  • Initial PHP file contents: Defaults to the following but you may change it to a more complex code fragment
<?php
    phpinfo();
?>
Main PHP Preference Panel
Main PHP Preference Panel

Code Assist

Auto-activation

Filtering

One of:

Performance

Code Templates

Create, edit or remove templates that you use as keyboard shortcuts to insert more complex strings of PHP code. Templates can include placeholders for you to input context-specific elements.

The table lists the available shortcuts. Examples templates that come baked in are:

Available Actions

Import and Export are handy for getting your customized set of templates from one machine to another!

Colors: PHP

Manage Colorization

  • Import: Add color rules from a .col file
  • Export: Saves the current set as a .col file
  • Override Eclipse editor settings: If enabled, the PHP Editor will use the color settings on this panel, otherwise it uses the Eclipse defaults colors.

Colorizer File Format details - very technical!

Editor Options

  • Override Eclipse Options: Activates the rest of this panel's controls so you can customize the color set
  • The remaining controls enable you to change the colors used for specific sections of code and language elements.
  • Click any color button to open a color picker--the specific picker depends on your operating system.

Colors: PHPdoc

Manage Colorization

  • Import: Add color rules from a .col file
  • Export: Saves the current set as a .col file
  • Override Eclipse editor settings: If enabled, the PHP Editor will use the color settings on this panel, otherwise it uses the Eclipse defaults colors.

Colorizer File Format details - very technical!

Editor Options

  • Override Eclipse Options: Activates the rest of this panel's controls so you can customize the color set
  • The remaining controls enable you to change the colors used for specific sections of code and language elements.
  • Click any color button to open a color picker--the specific picker depends on your operating system.
Colors:PHP Preference Panel
Colors:PHP Preference Panel

Debug

Allow multiple debug sessions

The debugger has the ability to run multiple, independent debugging sessions if you desire.

Switch back to Aptana perspective when the debug is terminated

Installed Debuggers

We support debugging with both Zend and XDebug but only XDebug is supplied with Aptana Studio; to use the Zend Debugger you must install it separately and configure it on the Preferences panel.

Using either debugger requires an internal port to be open when Aptana Studio is open.

Note: For XDebug, Aptana Studio verifies that the debug client port specified in php.ini and Aptana Studio preferences are the same.

Folding

The remaining options, if folding is enabled, determine the fold state of the specific block type:

Formatting

  • Format Preference Page: Choose from the default conventions, a set you added or imported, or none
  • Show project specific settings link: Select project from list to set the text file encoding and new text file line delimiter.
  • Clicking Edit allows you to specify formatting for various language elements such as spaces or tabs, new lines for control statements, brace locations and new line use.
  • New lets you create a set of conventions, optionally starting from the default set
  • Import adds a set of conventions from a file
  • Remove is only available when a non-default set is active
  • Restore defaults resets the conventions as shipped with Studio
The big text area that occupies most of the panel shows a preview based on the active settings.
PHP Formatting Set Panel
PHP Formatting Set Panel

PHP Interpreters

Lists the configured PHP interpreters; two instances (command line and CGI) using XDebug are configured by default by Aptana Studio.

PHP Libraries

Add a library path to your framework to get Code Assist for it in all PHP projects in your workspace. For example, to add the Zend Framework, you need to add the library folder of the framework (e.g., C:/ZendFramework-1.6.2-minimal/library/).

To turn off Code Assist for the library on specific projects right click a project and remove Code Assist (using the project's PHP Buildpath preference page).

PHP Manual

These settings determine what opens when you use the Open PHP Manual command in the PHP editor.

Preview

  • Automatically save editor when preview tab is selected: on/off
  • Prevent caching of preview pages: on/off
  • Preview Type: (select one of)
    • Sample URL
    • Use Server: Choose from Studio's built-in Apache server, any server you previously configured or add a new server
      • Append project name: on/off; always enabled for the built-in server, your choice otherwise
    • Use Run Configuration: Choose from an existing Run configuration or add a new one
    • Use absolute URL
      • Append project relative path: on/off
    • Use file URL: Opens the browser to a file::/path/to/file/filename.extension URL

Preview Browsers

  • Set the browser previews that will be used with files opened in the PHP editor
  • This is OS-dependent
  • Default choices are from Internet Explorer, Firefox, Safari (OS X only) and iPhone
PHP Preview Preference Panel
PHP Preview Preference Panel

Task Tags

Tasks are shown in the Tasks view.

Typing

Auto-insert matching characters:

Choose what happens when you type an opening block delimiter (such as a brace, quote, bracket, etc.)

Validation