Apex Code Completion

The Code Сompletion feature gives you the ability to improve your productivity and reduce the number of possible mistakes in a code. It helps to concentrate on writing code instead of remembering the right property and method. This feature is available for different types of files with Apex code — regular classes, Triggers, and Anonymous Apex files. All of them have the same level of support and Code Assistance features.

Apex Code Completion

The Code Completion in The Welkin Suite uses default settings. You can change them in the Preferences menu: Main Menu ⇒ The Welkin Suite ⇒ Preferences ⇒ Text Editor ⇒ Code Assistance.

List Members

One of the most often used features of Code Completion is the List Members option. When you type some code, The Welkin Suite offers you a scope of possible variants to insert. For example, it can be a list of options after a period, or a list of available tags after an opening tag brace <. If you continue typing characters, the list is filtered to include only the members that begin with those characters.

NB: The Welkin Suite provides you with fully support for generics in Apex — this means, that when you're looking for methods / properties of the list itself, you'll get them in a completion list, but when you're looking for completions for the list items, you'll get the completions for the generic types, but not for the List types.

The list includes only the items that apply to your current context, and it uses only the active project. It provides you with more context-tailored completions, as well as it removes all the items that are irrelevant to the current context suggestions. The search of the correct suggestion for each case looks both on upper- and lowercases. The most recently used items usually are at the top of the suggestions list. In case there are no items which begin with the text you've entered, the Code Completion doesn't show any suggestions.

Every item in this list has an icon that represents its type, such as namespace, class, function, or variable.

Apex Code Completion

If the list is long, you can scroll it using the arrows keys.

If you select an item, you will see a tip with information about this member near it. To insert a member, double-click on it.

The List Members feature is automatically called when you type some code. You can invoke it manually from the Main Menu: Edit ⇒ Show Completion Window, or by pressing the Ctrl+Space hotkey.

You are also able to turn off the List Members option. Navigate to the Main Menu: The Welkin Suite ⇒ Preferences ⇒ Text Editor ⇒ Code Completion and deselect the checkbox Show completion list after a character is typed.

Braces Completion

One more option that helps to work more efficient is the Brace Completion feature. When you enter any opening brace ((, [, <, {), The Welkin Suite automatically adds the closing brace. If you press the Backspace button, the IDE will remove all inserted braces (opening and closing).

By default, this option is turn on. You can turn it off from the Preferences menu: The Welkin Suite ⇒ Preferences ⇒ Text Editor ⇒ Code Completion ⇒ Completion Characters.

In this section:

This also may be useful:

Last modified: 2017/06/14 11:15

footer image