You use this panel to adjust some general properties that control the look and behavior of the Source Editor.
You can access this panel by choosing Tools > Options from the main menu, and then clicking the Editor category.
This panel contains the following tabs where you can set editor options.
General. This tab enables you to customize global code folding and camel case settings.
Formatting. This tab enables you to customize global indentation for files in the Source Editor.
Code Completion. This tab enables you to customize code completion for
the languages that support this feature.
Code Templates. This tab enables you to customize the abbreviations for terms that you want the editor to expand automatically.
Hints. This tab enables you to customize hints and tips that help you as you type in the Source Editor.
Mark Occurrences. This tab enables you to specify which occurrences of Java keywords will be marked
when the cursor is on one of their instances.
Macros. This tab enables you to customize Source Editor macros and to set shortcuts for macros.
General tab
Code Folding
Use Code Folding. If selected, you have the option of collapsing the display of code blocks.
You can select which types of code blocks are collapsed by default.
Code folding is applied only to editor types that support code folding, such as the Java editor.
Collapse by Default. Select the types of code blocks that are are collapsed by default.
Camel Case Behavior. Enable Camel Case Navigation in Java. For
example, the caret stops at "J", "T", and "N", in "JavaTypeName", when
you use the next/previous word actions.
Formatting tab
This tab enables you to specify the following Java source code formatting settings:
Expand Tabs to Spaces. When selected, inserts spaces when the Tab key is typed.
When unselected, typing the Tab key inserts the tab character (\t) into the file if
possible. It also replaces preceding spaces with the tab character if possible.
The Source Editor calculates where to place tab characters based on the value
of the Tab Size property.
If Expand Tabs to Spaces is unselected and the Number of Spaces per Indent is different
than the Tab Size property, the indentation created by typing the Tab key is
made up of a combination of spaces and tab characters. It is easiest to predict
the location of tab characters if you set Number of Spaces per Indent to an even
multiple or divisor of Tab Size.
Number of Spaces per Indent. Specifies the number of spaces represented by one indentation level.
Tab Size. See the description of Expand Tabs to Spaces, above.
Right Margin. Specifies the location of the right margin, which is 80 characters by default.
Line Wrap. Disabled by default. Use the dropdown list to specify where the break for line wrapping in the source code will occur.
The Preview pane displays how the applied changes will appear in the Source Editor.
Code Completion
As you are typing in the Source Editor, you can use the IDE's code completion feature to find code snippets and have them filled in for you automatically.
You can set the following code completion properties.
Auto Popup Completion Window. When selected, enables the editor to display a code completion box with
options for how to complete an expression.
This property applies only to editor types that support code completion, such as Java, HTML, and JSP.
Auto Popup Documentation Window. When selected, the documentation window appears
automatically, otherwise only if it is invoked explicitly (Ctrl-Shift-Space, by default).
Display Documentation Next to Completion. Specifies that the
code completion window appears next to, rather than above/below, the related code.
Insert Single Proposals Automatically. When selected, the code completion box does not appear when the IDE is aware of
only one possible completion for the expression. The expression is completed automatically, but
only if you invoke code completion explicitly, not if you simply type "." behind an identifier.
Case Sensitive Code Completion. If selected, the code completion box only displays results that match the case of the expression
that you are typing.
Show Deprecated Members in Code Completion. If selected, any deprecrated class elements that are available are shown
in the completion box. Deprecated members are struck through with a line to indicate that they are deprecated.
Insert Closing Brackets Automatically. When selected, the Source Editor generates the closing parenthesis, bracket,
brace, or quotation mark after you type the first one.
Code Templates tab
Use this tab to modify the abbreviations for terms that you want the editor to expand automatically.
Select a language from the drop-down list to see the abbreviations available.
For each language you can do the following:
Select an abbreviation from the list and type in the Abbreviation or Expanded Text field to modify the abbreviation.
Select an abbreviation from the list and click Remove to remove the abbreviation.
Click New and type the abbreviation and description in the respective fields.
You can use the Expand Template On drop-down list to change the
key or key combination that is used to expand the abbreviations.
By default, abbreviations are expanded when you press Tab.
The Expand Template On drop-down list also contains the options of Space, Shift-Space, and Enter.
Using code template syntax,
you can add further functionality to templates or create new templates.
The web tutorial also describes the code template syntax and includes use cases. It is useful not only for PHP developers!
Macros tab
Use this tab to edit, add, and remove Source Editor macros.
The macro names and shortcuts are listed in the upper pane.
The Macro Code editor in the lower pane displays the macro code and enables you to edit the code directly.
To modify the macro code, select a macro from the list and edit the code in the Macro Code editor.
To set a keyboard shortcut for a macro, select a macro from the list, click the Set Shortcut button and enter the shortcut in the dialog box.
To create a new macro, click the New button, enter the name for the new macro, then select the new macro in the list and enter the code in the Macro Code editor.
To remove a macro, select a macro from the list and click the Remove button.
It is generally easier to add a new macro by recording it than by adding one manually in the Macro Code editor.