See Also 

Code Completion

Code Completion is a common name for a set of features that facilitate and speed up the process of coding.

The following types of code completion are provided:

Snippets

Snippets enable the user to generate code for various elements automatically.

  1. Choose Tools > Palette > HTML/JSP Code Clips. A palette containing various user interface elements appears in the right-hand panel.
  2. Drag the required icon on the palette to the relevant position in the code. A dialog box for specifying the parameters of the corresponding elements appears. Fill in the data.
  3. The code that displays the chosen element is generated and inserted in the chosen location.

Context-Sensitive Proposals

The editor provides context-sensitive proposals for completing any number of starting symbols of:

The editor not only suggests expansions but also provides parameter hints. To apply Code Completion:

  1. Type the starting symbols of the required character string.
  2. Press CTRL + Space. A dropdown list shows the context-sensitive proposals. Each proposal is supplied with a description and parameter hints. The contents of the list change as you continue typing.
  3. To obtain a list of the PHP key words that are available in the current context, press CTRL + Space without any previous typing.
  4. To obtain a hint on a variable, just type the dollar symbol "$". A list of all the currently available local and global variables appears.

Code Templates and Abbreviations

In the current context, the term ""abbreviations" refers to a set of predefined character strings that correspond to the key words used in a programming language. Each abbreviation is associated with an expanded text which contains the full key word and a code template for the key word with parameter hints. To apply this functionality, type an abbreviation and press Tab. The abbreviation is replaced with the corresponding key word and the code template for the key word is provided.
To view the list of defined abbreviation with code templates:

  1. Choose Tools > Options > Editor > Code Templates.
  2. From the Language drop down list, select PHP. The list of PHP abbreviations and code template defined for them is displayed.
  3. To add or remove a definition from the list, use the New or Remove buttons respectively.
  4. To edit a definition, select the relevant row and edit the text in the edit field below the list.

For more information, see .

Code Completion for Constructors

After the new keyword, the code completion window is displayed with constructors and parameters for all available classes in the project.

SQL Code Completion

SQL code completion displays when a string begins with the SQL keyword "select." The first step is to select the database connection.

All database connections registered with the IDE are displayed.

After you select the connection, SQL code completion offers all tables from that database connection.

If the table has columns, those are displayed as well.

SQL code completion also works with table aliases.

PHP 5.3 Namespaces

Code completion supports fully qualified, partially qualified, and unqualified namespace names from PHP 5.3. For more information, please see the

Overridden and Implemented Methods

Code completion between class members offers to override or implement methods.

See Also
Working with PHP
Project Tasks: Quick Reference

Legal Notices