Configuring Code Assist

You can use Code Assist to help insert or finish a tag or function or line of code in the editor as well as to select and insert templates.

The location of the cursor in the source file provides the context for the code assist  to offer suggestions for completion.

To request code assist while in the Editor:

In addition, you can set a preference that causes code assist to pop up automatically when certain characters are typed, as in HTML and XML.

The following issues are addressed in this section:

Setting PHP Preferences

  1. Select Preferences from the Window menu.

  2. Go to PHP | Editor | Code Assist.

  3. Select your configuration options.

Figure 1: Setting Code Assist Preferences

  1. Set the Code Assist Preferences as shown below:

Code Assist Options

General

Filters

Auto-activation

  Note:  A maximum of 4 characters can be entered.

Keywords

__CLASS__

DECLARE

EXTENDS

PHP_USER_FILTER

__FILE__

DEFAULT

FINAL

PRINT

__FUNCTION__

DIE

FOR

PRIVATE

__LINE__

DO

FOREACH

PROTECTED

__METHOD__

ECHO

FUNCTION

PUBLIC

ABSTRACT

ELSE

GLOBAL

REQUIRE

AND

ELSEIF

IF

REQUIRE_ONCE

ARRAY

EMPTY

IMPLEMENTS

RETURN

AS

ENDDECLARE

INCLUDE

STATIC

BREAK

ENDFOR

INCLUDE_ONCE

SWITCH

CASE

ENDFOREACH

INTERFACE

THROW

CATCH

ENDIF

ISSET

TRY

CFUNCTION

ENDSWITCH

LIST

UNSET

CLASS

ENDWHILE

NEW

USE

CLONE

EVAL

OLD_FUNCTION

VAR

CONST

EXCEPTION

OR

WHILE

CONTINUE

EXIT

 

XOR

Setting Code Assist HTML Preferences

  1. Select Preferences from the Window menu.

  2. Select Web and XML Files from the navigator, followed by HTML Files. Expand. Select HTML Source.

  3. In the Code Assist group box, select the Auto-Activation check box.

  4. Supply any additional characters that should trigger code assist .

  5. If the cursor location enables Code Assist, a pop-up list of all available choices is displayed. A brief description of the code is provided for each.

  6. Complete the options for HTML Styles and HTML Source.