As you type 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. In this tab, you can customize code completion. Some code completion properties apply to all languages, while others are language-specific.
This panel has the following elements.
Element | Description |
---|---|
Language |
The language whose global formatting options you want to edit. |
All Languages |
All languages that support code completion. |
HTML |
Formatting options that are specific to HTML. |
JSON | Formatting options that are specific to JSON. |
Java |
Formatting options that are specific to Java. |
JavaScript | Formatting options that are specific to JavaScript. |
PHP |
Formatting options that are specific to PHP. |
C/C++ |
Formatting options that are specific to C/C++. |
The following code completion options are available when you select All Languages as the language and apply to all languages, where applicable.
Element | Description |
---|---|
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, JSP and C/C++. |
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 deprecated 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. |
The following code completion options are available when you select HTML as the language and apply only to HTML files.
Element | Description |
---|---|
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. |
Equals-sign (=) Keypress After Attribute Name Autocompletes Quote Set |
If you type an HTML tag with an attribute name, like <img src , and then type = , the IDE adds a pair of quote tags and places your cursor between the quote tags. So if you type <img src=, the IDE expands this to <img src="|". Enabled 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. |
The following code completion options are available when you select JSON as the language and apply only to JSON files.
Element | Description |
---|---|
Quotes Completion |
Enables completion of quotes when selected. |
Use Smart Quotes (" and ') Completion (after text selection, etc.) |
When selected, enables the editor to apply double or single quotes to selected text, etc. |
The following code completion options are available when you select Java as the language and apply only to Java files.
Element | Description |
---|---|
Guess Filled Method Arguments |
When selected, enables the editor to insert a variable available in the current context as the method argument. Enabled by default. |
Auto Popup Triggers for Java |
Specify the patterns upon which code completion appears. For example, a new dot can trigger code completion, so that related method parameters are shown. |
Auto Popup on Typing Any Java Identifier Part |
If this option is enabled, code completion is shown when a new Java identifier part is entered. |
Completion Selectors for Java |
Specify the characters that confirm the current selection in the code completion box. When one of the selectors is pressed, the current item in the code completion box is selected and entered in the editor, with the selector appearing after it. |
Subword completion |
Enables code completion of subwords when selected. |
Packages/classes |
Enables you to limit what is shown in the code completion box. |
Exclude |
Define which packages, classes, or methods must be excluded from code completion. Click Add to specify, Edit to modify, or Remove to delete an excluded pattern. |
Include |
Define which packages, classes, or methods must be included into code completion. Click Add to specify, Edit to modify, or Remove to delete an included pattern. |
Apply rules to methods |
When selected, enables the editor to apply the specified excluded and included patterns to methods. |
Auto Popup Triggers for Javadoc |
Specify the patterns upon which the code completion box prompts inside Javadoc comments. |
The following code completion options are available when you select JavaScript as the language and apply only to JavaScript files.
Element | Description |
---|---|
Enable Auto Popup Completion Window for |
Enables the editor to display a code completion box with options for how to complete an expression. Decide the circumstances under which the completion window opens from the following options: |
All Possible Situations |
The auto popup completion window opens whenever it can be of use. |
Customize |
Select the Customize option and then tick the boxes for the circumstances under which the auto popup completion window opens. If you select Customize and do not select any of the circumstances under Customize, the auto popup completion window will never open. |
After "." | Select to enable code completion after a dot. |
Type Resolution |
Enables the editor display types suitable in the current context. |
Perform full type resolution |
When selected, all applicable types with respective functions and variables get resolved and used for code completion and in the Navigator. |
Quotes Completion |
Enables completion of quotes when selected. |
Use Smart Quotes (" and ') Completion (after text selection, etc.) |
When selected, enables the editor to apply double or single quotes to selected text, etc. |
Code Completion Item Signature Char Width |
Use to specify the width of the code completion box for JavaScript. The default is 40. |
The following code completion options are available when you select PHP as the language and apply only to PHP files.
Element | Description |
---|---|
Enable Auto Popup Completion Window |
Enables the editor to display a code completion box with options for how to complete an expression. Decide the circumstances under which the completion window opens from the following options: |
All Possible Situations |
The auto popup completion window opens whenever it can be of use. |
Customize |
Select the Customize option and then tick the boxes for the circumstances under which the auto popup completion window opens. If you select Customize and do not select any of the circumstances under Customize, the auto popup completion window will never open. |
Code Completion for Class Methods |
Select the class methods that prompt a code completion window. |
Also Static Methods after "->" |
Selected by default. |
Also Non-static Methods after "::" |
Disabled by default. |
Use Smart Parameters Pre-Filling |
Code completion suggests valid variables (of desired type), so you don't have to rewrite method calls every time you use code completion. Enabled by default. |
Code Completion for Variables |
Select to have code completion for all variables (default) or only variables in the local file. |
Type of Code Completion (PHP 5.3 only) |
Select which type of code completion to use when referring to classes: |
Smart |
Uses partially qualified names according to namespace declarations. Default. |
Fully Qualified |
Always use fully qualified names regardless of namespace declarations. |
Unqualified |
Always use names without namespaces. |
The following code completion options are available when you select C/C++ as the language and apply only to C/C++ projects.
Element | Description |
---|---|
Auto Popup Triggers for C/C++ Identifier |
When you type the symbols shown in this field, the editor opens a popup completion window to enable you to select an identifier from a list. The symbols ,->:: are the default triggers, and you can add or remove symbols.. |
Auto Insert #include Directives for Completed Identifiers |
If you select this option, the editor automatically inserts the appropriate #include directive required for an identifier you selected from a code completion popup window. This option is enabled by default. |
Auto Popup Triggers for #include Directives |
Specify the characters that, when typed after the #include directive, cause the popup completion window to display a list of headers files. If you type a double-quotation mark (") a completion popup of header files from your project displays. If you type a left-angle bracket (<) the completion popup shows header files that are on the compiler search path. This option is enabled by default. . |
Related Topics
Developing Applications with NetBeans IDE,
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |