This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-website.git
The following commit(s) were added to refs/heads/asf-site by this push: new 510d194 Automated site publishing by Jenkins build 288 510d194 is described below commit 510d1944ad2dfe34e7c72e2bb79d589857408f86 Author: jenkins <bui...@apache.org> AuthorDate: Thu Jan 17 15:43:44 2019 +0000 Automated site publishing by Jenkins build 288 --- content/kb/docs/java/editor-codereference.html | 1847 +++++++++++++----------- 1 file changed, 1019 insertions(+), 828 deletions(-) diff --git a/content/kb/docs/java/editor-codereference.html b/content/kb/docs/java/editor-codereference.html index 570ae85..e0d284f 100644 --- a/content/kb/docs/java/editor-codereference.html +++ b/content/kb/docs/java/editor-codereference.html @@ -91,7 +91,6 @@ <li><a href="#_using_hints">Using Hints</a></li> <li><a href="#_general_editor_features">General Editor Features</a></li> <li><a href="#_semantic_coloring_and_highlighting">Semantic Coloring and Highlighting</a></li> -<li><a href="#_navigation">Navigation</a></li> <li><a href="#_see_also">See Also</a></li> <li><a href="#_appendix_a_icons_in_the_code_completion_window">Appendix A: Icons in the Code Completion Window</a></li> </ul> @@ -111,217 +110,256 @@ </div> <div class="sect3"> <h4 id="_invoking_code_completion">Invoking Code Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/codecompletion3.png" alt="codecompletion3"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Press <code>Ctrl-Space</code> (or choose Source > Complete Code from the main menu) to open the code completion box. While you are typing, the list of suggestions shortens. The suggestions listed include those imported in your source file and symbols from the <code>java.lang</code> package.</p> -<p class="tableblock">To customize the code completion settings, select Tools > Options > Editor > Code Completion.</p> -<p class="tableblock">For example, you can set the code completion window to pop up either automatically or only on an as-needed basis. On the Code Completion tab, select the Auto Popup Completion Window checkbox to invoke the code completion window automatically when you are typing certain characters. The default character is " <code>.</code> ", but you can add your own characters.</p> -<p class="tableblock">To add characters that invoke the code completion window, select Java from the Language drop-down list and type your characters in the Auto Popup Triggers for Java field. The code completion window will pop up every time you type the specified characters.</p> -<p class="tableblock">When the Auto Popup Completion Window checkbox is disabled, you need to press <code>Ctrl-Space</code> each time you want to use code completion.</p> -<p class="tableblock">Instead of using <code>Ctrl-Space</code> for code completion, you can use "hippie completion" instead. Hippie completion analyzes text in the visible scope and suggests to complete a word with a keyword, class name, method, or variable. Press <code>Ctrl-K</code> and the editor automatically completes the word you’re typing for you, using hippie completion, by searching in your current document (and if not found) in other documents.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/codecompletion4.png" alt="codecompletion4"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">The first time <code>Ctrl-Space</code> is pressed, only items matching the type, in this example an <code>int</code> , are shown. Press <code>Ctrl-Space</code> a second time, that is, press <code>Ctrl-Space</code> twice, and <em>all</em> the available items are shown, regardless of whether they match the provided type, as shown in the example on the left.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/codecompletion3.png" alt="codecompletion3"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>Press <code>Ctrl-Space</code> (or choose Source > Complete Code from the main menu) to open the code completion box. While you are typing, the list of suggestions shortens. The suggestions listed include those imported in your source file and symbols from the <code>java.lang</code> package.</p> +</div> +<div class="paragraph"> +<p>To customize the code completion settings, select Tools > Options > Editor > Code Completion.</p> +</div> +<div class="paragraph"> +<p>For example, you can set the code completion window to pop up either automatically or only on an as-needed basis. On the Code Completion tab, select the Auto Popup Completion Window checkbox to invoke the code completion window automatically when you are typing certain characters. The default character is " <code>.</code> ", but you can add your own characters.</p> +</div> +<div class="paragraph"> +<p>To add characters that invoke the code completion window, select Java from the Language drop-down list and type your characters in the Auto Popup Triggers for Java field. The code completion window will pop up every time you type the specified characters.</p> +</div> +<div class="paragraph"> +<p>When the Auto Popup Completion Window checkbox is disabled, you need to press <code>Ctrl-Space</code> each time you want to use code completion.</p> +</div> +<div class="paragraph"> +<p>Instead of using <code>Ctrl-Space</code> for code completion, you can use "hippie completion" instead. Hippie completion analyzes text in the visible scope and suggests to complete a word with a keyword, class name, method, or variable. Press <code>Ctrl-K</code> and the editor automatically completes the word you’re typing for you, using hippie completion, by searching in your current document (and if not found) in other documents.</p> +</div> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock right"> +<div class="content"> +<img src="images/codecompletion4.png" alt="codecompletion4"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>The first time <code>Ctrl-Space</code> is pressed, only items matching the type, in this example an <code>int</code> , are shown. Press <code>Ctrl-Space</code> a second time, that is, press <code>Ctrl-Space</code> twice, and <em>all</em> the available items are shown, regardless of whether they match the provided type, as shown in the example on the left.</p> +</div> </div> <div class="sect3"> <h4 id="_smart_suggestions_at_the_top">Smart Suggestions at the Top</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/smartcompletion1.png" alt="smartcompletion1"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">In NetBeans IDE, Java code completion is "smart," which means that the suggestions that are the most relevant for the context of your code are displayed at the top, above the black line in the code completion window.</p> -<p class="tableblock">In the example on the left, the editor suggests inserting the <code>LinkedHashMap</code> constructor from the <code>java.util</code> package.</p> -<p class="tableblock">If the "smart" suggestions are not the ones you want to use, press <code>Ctrl-Space</code> again to see the complete list, as shown above.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/smartcompletion1.png" alt="smartcompletion1"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>In NetBeans IDE, Java code completion is "smart," which means that the suggestions that are the most relevant for the context of your code are displayed at the top, above the black line in the code completion window.</p> +</div> +<div class="paragraph"> +<p>In the example on the left, the editor suggests inserting the <code>LinkedHashMap</code> constructor from the <code>java.util</code> package.</p> +</div> +<div class="paragraph"> +<p>If the "smart" suggestions are not the ones you want to use, press <code>Ctrl-Space</code> again to see the complete list, as shown above.</p> +</div> </div> <div class="sect3"> <h4 id="_camel_case_completion">Camel Case Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/camelcase.png" alt="camelcase"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Instead of typing consecutive characters, and then calling code completion, you can type the initial capital letters of the word you’re interested in.</p> -<p class="tableblock">For example, type <code>IE</code> , press <code>Ctrl-Space</code> , and you will see a list of suggestions that match via camel case completion using the letter <code>I</code> and then the letter <code>E</code> .</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/camelcase.png" alt="camelcase"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>Instead of typing consecutive characters, and then calling code completion, you can type the initial capital letters of the word you’re interested in.</p> +</div> +<div class="paragraph"> +<p>For example, type <code>IE</code> , press <code>Ctrl-Space</code> , and you will see a list of suggestions that match via camel case completion using the letter <code>I</code> and then the letter <code>E</code> .</p> +</div> </div> <div class="sect3"> <h4 id="_completing_keywords">Completing Keywords</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/keywords.png" alt="keywords"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Use code completion ( <code>Ctrl-Space)</code> to complete keywords in your code. The editor analyzes the context and suggests the most relevant keywords.</p> -<p class="tableblock">In the example on the left, the <code>ColorChooser</code> class needs to extend the <code>JPanel</code> class. You can quickly add the keyword <code>extends</code> from the suggested items.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/keywords.png" alt="keywords"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>Use code completion ( <code>Ctrl-Space)</code> to complete keywords in your code. The editor analyzes the context and suggests the most relevant keywords.</p> +</div> +<div class="paragraph"> +<p>In the example on the left, the <code>ColorChooser</code> class needs to extend the <code>JPanel</code> class. You can quickly add the keyword <code>extends</code> from the suggested items.</p> +</div> </div> <div class="sect3"> <h4 id="_suggesting_names_for_variable_and_fields">Suggesting Names for Variable and Fields</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/names.png" alt="names"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">When you are adding a new field or a variable, use code completion ( <code>Ctrl-Space)</code> to choose a name that matches its type.</p> -<p class="tableblock">Type a prefix for the new name, press <code>Ctrl-Space</code> and select the name you want to use from the list of suggestions.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/names.png" alt="names"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>When you are adding a new field or a variable, use code completion ( <code>Ctrl-Space)</code> to choose a name that matches its type.</p> +</div> +<div class="paragraph"> +<p>Type a prefix for the new name, press <code>Ctrl-Space</code> and select the name you want to use from the list of suggestions.</p> +</div> </div> <div class="sect3"> <h4 id="_suggesting_parameters">Suggesting Parameters</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/parameter.png" alt="parameter"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">The editor guesses on the parameters for variables, methods, or fields and displays the suggestions in a pop-up box.</p> -<p class="tableblock">For example, when you select a method from the code completion window which has one or more arguments, the Editor highlights the first argument and displays a tooltip suggesting the format for this argument. To move to the next argument, press the <code>Tab</code> or <code>Enter</code> keys.</p> -<p class="tableblock">You can invoke the tooltips with method parameters by pressing <code>Ctrl-P</code> (or Source > Show Method Parameters) at any time.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock"> +<div class="content"> +<img src="images/parameter.png" alt="parameter"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>The editor guesses on the parameters for variables, methods, or fields and displays the suggestions in a pop-up box.</p> +</div> +<div class="paragraph"> +<p>For example, when you select a method from the code completion window which has one or more arguments, the Editor highlights the first argument and displays a tooltip suggesting the format for this argument. To move to the next argument, press the <code>Tab</code> or <code>Enter</code> keys.</p> +</div> +<div class="paragraph"> +<p>You can invoke the tooltips with method parameters by pressing <code>Ctrl-P</code> (or Source > Show Method Parameters) at any time.</p> +</div> </div> <div class="sect3"> <h4 id="_common_prefix_completion">Common Prefix Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/prefixcompletion.png" alt="prefixcompletion"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can use the <code>Tab</code> key to quickly fill in the most commonly used prefixes and single suggestions.</p> -<p class="tableblock">To check out how this feature works, try typing the following:</p> -<p class="tableblock">1. Type <code>System.out.p</code> and wait for code completion to show all fields and methods that start with "p." All the suggestions will be related to "print." -2. Press the <code>Tab</code> key and the editor automatically fills in the "print". You can continue and type "l" and, after pressing Tab, the "println" will be added.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock"> +<div class="content"> +<img src="images/prefixcompletion.png" alt="prefixcompletion"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>You can use the <code>Tab</code> key to quickly fill in the most commonly used prefixes and single suggestions.</p> +</div> +<div class="paragraph"> +<p>To check out how this feature works, try typing the following:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Type <code>System.out.p</code> and wait for code completion to show all fields and methods that start with "p." All the suggestions will be related to "print."</p> +</li> +<li> +<p>Press the <code>Tab</code> key and the editor automatically fills in the "print". You can continue and type "l" and, after pressing Tab, the "println" will be added.</p> +</li> +</ol> +</div> </div> <div class="sect3"> <h4 id="_subword_completion">Subword Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 33.3333%;"> -<col style="width: 33.3333%;"> -<col style="width: 33.3334%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/subcompletion.png" alt="subcompletion"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Sometimes you may not remember how an items starts, making it difficult to use code completion. Instead, to see all items that relate to listening to property changes, you can specify that subword completion should be enabled, so that you can use <code>prop</code> in code completion, to see all method calls that relate to property change listening.</p> -<p class="tableblock">1. Select Tools > Options > Editor > Code Completion. -2. Check the Subword completion checkbox in the Editor</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Code Completion tab in the Options window. -3. Type part of the method you want to call, <code>prop</code> as shown here, and then call up code completion. Relevant subwords, all applicable to properties on the object, in this example, are displayed.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/subcompletion.png" alt="subcompletion"> +</div> +</div> +<div class="paragraph"> +<p>Sometimes you may not remember how an items starts, making it difficult to use code completion. Instead, to see all items that relate to listening to property changes, you can specify that subword completion should be enabled, so that you can use <code>prop</code> in code completion, to see all method calls that relate to property change listening.</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Select Tools > Options > Editor > Code Completion.</p> +</li> +<li> +<p>Check the Subword completion checkbox in the Editor | Code Completion tab in the Options window.</p> +</li> +<li> +<p>Type part of the method you want to call, <code>prop</code> as shown here, and then call up code completion. Relevant subwords, all applicable to properties on the object, in this example, are displayed.</p> +</li> +</ol> +</div> </div> <div class="sect3"> <h4 id="_chain_completion">Chain Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/chain.png" alt="chain"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">When you need to type a chain of commands, use smart code completion, that is, press <code>Ctrl-Space</code> twice, and available chains will be shown. The editor scans variables, fields, and methods, that are visible from the context, and it will then suggest a chain that satisfies the expected type.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/chain.png" alt="chain"> +</div> +</div> +<div class="paragraph"> +<p>When you need to type a chain of commands, use smart code completion, that is, press <code>Ctrl-Space</code> twice, and available chains will be shown. The editor scans variables, fields, and methods, that are visible from the context, and it will then suggest a chain that satisfies the expected type.</p> +</div> </div> <div class="sect3"> <h4 id="_completion_of_static_imports">Completion of Static Imports</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/static.png" alt="static"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">When you need to complete a statement while needing to make use of a static import statement, use smart code completion, that is, press <code>Ctrl-Space</code> twice, and available static import statements will be shown.</p> -<p class="tableblock">If you would like static import statements to be added automatically when you complete static statements as described above, go to Tools > Options > Editor > Formatting, select Java from the Language drop-down and Imports from the Category drop-down. Check the Prefer Static Imports checkbox.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/static.png" alt="static"> +</div> +</div> +<div class="paragraph"> +<p>When you need to complete a statement while needing to make use of a static import statement, use smart code completion, that is, press <code>Ctrl-Space</code> twice, and available static import statements will be shown.</p> +</div> +<div class="paragraph"> +<p>If you would like static import statements to be added automatically when you complete static statements as described above, go to Tools > Options > Editor > Formatting, select Java from the Language drop-down and Imports from the Category drop-down. Check the Prefer Static Imports checkbox.</p> +</div> </div> <div class="sect3"> <h4 id="_excluding_items_from_completion">Excluding Items from Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/exclude2-small.png" alt="exclude2 small"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Time is wasted when code completion returns classes that you seldom or never use. When you use smart code completion, that is, when you press <code>Ctrl-Space</code> twice, a lightbulb within the returned items lets you exclude items from code completion.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/exclude.png" alt="exclude"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Either when "Configure excludes" is selected in code completion or when you go to Tools > Options > Editor > Code Completion, you can modify the exclusion rules you have defined.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/exclude2-small.png" alt="exclude2 small"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>Time is wasted when code completion returns classes that you seldom or never use. When you use smart code completion, that is, when you press <code>Ctrl-Space</code> twice, a lightbulb within the returned items lets you exclude items from code completion.</p> +</div> +<div class="openblock feature"> +<div class="content"> +<div class="paragraph"> +<p><span class="image right"><img src="images/exclude.png" alt="exclude"></span></p> +</div> +</div> +</div> +<div class="paragraph"> +<p>Either when "Configure excludes" is selected in code completion or when you go to Tools > Options > Editor > Code Completion, you can modify the exclusion rules you have defined.</p> +</div> </div> <div class="sect3"> <h4 id="_jpa_completion">JPA Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/jpacompletion.png" alt="jpacompletion"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">When you are using the Java Persistence Annotation specification (JPA), you can complete SQL expressions in <code>@NamedQuery</code> statements via code completion.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/jpacompletion.png" alt="jpacompletion"> +</div> +</div> <div class="paragraph"> -<p>In the code completion window, icons are used to distinguish different members of the Java language. See <a href="#appendixa">Appendix A</a> at the end of this document to see the meanings of these icons.</p> +<p>When you are using the Java Persistence Annotation specification (JPA), you can complete SQL expressions in <code>@NamedQuery</code> statements via code completion.</p> </div> <div class="paragraph"> -<p><a href="#top">top</a></p> +<p>In the code completion window, icons are used to distinguish different members of the Java language. See <a href="#appendixa">Appendix A</a> at the end of this document to see the meanings of these icons.</p> </div> </div> </div> @@ -330,91 +368,110 @@ <div class="paragraph"> <p>There are several ways of how you can work with import statements. The IDE’s Java Editor constantly checks your code for the correct use of import statements and immediately warns you when non-imported classes or unused import statements are detected.</p> </div> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/imports3.png" alt="imports3"></span></p> -<p class="tableblock"> </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">When a non-imported class is found, the <span class="image"><img src="images/bulberror1.png" alt="bulberror1"></span> error mark appears in the IDE’s lefthand margin (this margin is also called the <em>glyph margin</em>). Click the error mark and choose whether to add the missing import or create this class in the current package.</p> -<p class="tableblock">While you are typing, press <code>Ctrl-Shift-I</code> (or choose Source > Fix Imports from the menu) to add all missing import statements at once.</p> -<p class="tableblock">Press <code>Alt-Shift-I</code> to add an import only for the type at which the cursor is located.</p> -<p class="tableblock"> </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/imports2.png" alt="imports2"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">When you select a class from the code completion window, the Editor automatically adds an import statement for it, so you do not need to worry about this.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/imports.png" alt="imports"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">If there are unused import statements in your code, press the <span class="image"><img src="images/bulberror.png" alt="bulberror"></span> warning mark in the Editor lefthand margin and choose either to remove one unused import or all unused imports. In the Editor, unused imports are underlined (see the <a href="#coloring">Semantic Coloring</a> section for details).</p> -<p class="tableblock">To quickly see if your code contains unused or missing imports, watch the error stripes in the righthand margin: orange stripes mark missing or unused imports.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/onsave.png"><img src="images/onsave-small.png" alt="onsave small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can specify that whenever you save a file, all the unused imports should automatically be removed.</p> -<p class="tableblock">Select Tools > Options > Editor > On Save.</p> -<p class="tableblock">Select Java from the Language drop-down.</p> -<p class="tableblock">Check the Remove Unused Imports checkbox.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/imports3.png" alt="imports3"> +</div> +</div> +</div> +</div> <div class="paragraph"> -<p><a href="#top">top</a></p> +<p>When a non-imported class is found, the <span class="image"><img src="images/bulberror1.png" alt="bulberror1"></span> error mark appears in the IDE’s lefthand margin (this margin is also called the <em>glyph margin</em>). Click the error mark and choose whether to add the missing import or create this class in the current package.</p> </div> +<div class="paragraph"> +<p>While you are typing, press <code>Ctrl-Shift-I</code> (or choose Source > Fix Imports from the menu) to add all missing import statements at once.</p> </div> -<div class="sect2"> -<h3 id="_generating_code">Generating Code</h3> <div class="paragraph"> -<p>When working in the Java Editor, you can generate pieces of code in one of the two ways: by using code completion or from the Code Generation dialog box. Let’s take a closer look at simple examples of automatic code generation.</p> +<p>Press <code>Alt-Shift-I</code> to add an import only for the type at which the cursor is located.</p> +</div> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock right"> +<div class="content"> +<img src="images/imports2.png" alt="imports2"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>When you select a class from the code completion window, the Editor automatically adds an import statement for it, so you do not need to worry about this.</p> +</div> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<img src="images/imports.png" alt="imports"> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>If there are unused import statements in your code, press the <span class="image"><img src="images/bulberror.png" alt="bulberror"></span> warning mark in the Editor lefthand margin and choose either to remove one unused import or all unused imports. In the Editor, unused imports are underlined (see the <a href="#coloring">Semantic Coloring</a> section for details).</p> +</div> +<div class="paragraph"> +<p>To quickly see if your code contains unused or missing imports, watch the error stripes in the righthand margin: orange stripes mark missing or unused imports.</p> +</div> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/onsave.png"><img src="images/onsave-small.png" alt="onsave small"></a> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>You can specify that whenever you save a file, all the unused imports should automatically be removed.</p> +</div> +<div class="paragraph"> +<p>Select Tools > Options > Editor > On Save.</p> +</div> +<div class="paragraph"> +<p>Select Java from the Language drop-down.</p> +</div> +<div class="paragraph"> +<p>Check the Remove Unused Imports checkbox.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_generating_code">Generating Code</h3> +<div class="paragraph"> +<p>When working in the Java Editor, you can generate pieces of code in one of the two ways: by using code completion or from the Code Generation dialog box. Let’s take a closer look at simple examples of automatic code generation.</p> +</div> +<div class="sect3"> +<h4 id="_using_the_code_generation_dialog_box">Using the Code Generation Dialog Box</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/codegeneration1.png" alt="codegeneration1"> +</div> +</div> +<div class="paragraph"> +<p>Press <code>Alt-Insert</code> (or choose Source > Insert Code) anywhere in the Editor to insert a construct from the Code Generation box. The suggested list is adjusted to the current context.</p> +</div> +<div class="paragraph"> +<p>In the example on the left, we are going to generate a constructor for the <code>ColorChooser</code> class. Press <code>Alt-Insert</code> , select Constructor from the Code Generation box, and specify the fields that will be initialized by the constructor. The Editor will generate the constructor with the specified parameters.</p> +</div> +<div class="paragraph"> +<p>In the IDE’s Java Editor, you can automatically generate various constructs and whole methods, override and delegate methods, add properties and more.</p> </div> -<div class="sect3"> -<h4 id="_using_the_code_generation_dialog_box">Using the Code Generation Dialog Box</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/codegeneration1.png" alt="codegeneration1"></span></p> -<p class="tableblock"> </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Press <code>Alt-Insert</code> (or choose Source > Insert Code) anywhere in the Editor to insert a construct from the Code Generation box. The suggested list is adjusted to the current context.</p> -<p class="tableblock">In the example on the left, we are going to generate a constructor for the <code>ColorChooser</code> class. Press <code>Alt-Insert</code> , select Constructor from the Code Generation box, and specify the fields that will be initialized by the constructor. The Editor will generate the constructor with the specified parameters.</p> -<p class="tableblock">In the IDE’s Java Editor, you can automatically generate various constructs and whole methods, override and delegate methods, add properties and more.</p></td> -</tr> -</tbody> -</table> </div> <div class="sect3"> <h4 id="_using_code_completion">Using Code Completion</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/codegeneration2.png" alt="codegeneration2"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can also generate code from the code completion window. In this example, we use the same piece of code as above to show how you can generate code from the code completion window.</p> -<p class="tableblock">Press Ctrl-Space to open the code completion window and choose the following item: <code>ColorChooser(String name, int number) - generate</code> . The Editor generates a constructor with the specified parameters.</p> -<p class="tableblock">In the code completion window, the constructors that can be automatically generated are marked with the <span class="image"><img src="images/newconstructor.png" alt="newconstructor"></span> icon and the " <code>generate</code> " note. For more explanations of the icons and their meanings, see <a href="#appendixa">Appendix A</a>.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/codegeneration2.png" alt="codegeneration2"> +</div> +</div> +<div class="paragraph"> +<p>You can also generate code from the code completion window. In this example, we use the same piece of code as above to show how you can generate code from the code completion window.</p> +</div> <div class="paragraph"> -<p><a href="#top">top</a></p> +<p>Press Ctrl-Space to open the code completion window and choose the following item: <code>ColorChooser(String name, int number) - generate</code> . The Editor generates a constructor with the specified parameters.</p> +</div> +<div class="paragraph"> +<p>In the code completion window, the constructors that can be automatically generated are marked with the <span class="image"><img src="images/newconstructor.png" alt="newconstructor"></span> icon and the " <code>generate</code> " note. For more explanations of the icons and their meanings, see <a href="#appendixa">Appendix A</a>.</p> </div> </div> </div> @@ -425,49 +482,66 @@ </div> <div class="sect3"> <h4 id="_using_code_templates">Using Code Templates</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/livetemplate.png" alt="livetemplate"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Code templates are marked with the <span class="image"><img src="images/codetemplateicon.png" alt="codetemplateicon"></span> icon in the code completion window.</p> -<p class="tableblock">You can do one of the following:</p> -<p class="tableblock">* Select a template from the code completion window and press Enter or -* Type the abbreviation for this template and press the key that expands this template (by default, <code>Tab</code> ).</p> -<p class="tableblock">In the expanded template, editable parts are displayed as blue boxes. Use the <code>Tab</code> key to go through the parts that you need to edit.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/livetemplate.png" alt="livetemplate"> +</div> +</div> +<div class="paragraph"> +<p>Code templates are marked with the <span class="image"><img src="images/codetemplateicon.png" alt="codetemplateicon"></span> icon in the code completion window.</p> +</div> +<div class="paragraph"> +<p>You can do one of the following:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Select a template from the code completion window and press Enter or</p> +</li> +<li> +<p>Type the abbreviation for this template and press the key that expands this template (by default, <code>Tab</code> ).</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>In the expanded template, editable parts are displayed as blue boxes. Use the <code>Tab</code> key to go through the parts that you need to edit.</p> +</div> </div> <div class="sect3"> <h4 id="_adding_or_editing_code_templates">Adding or Editing Code Templates</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/templateoptions.png"><img src="images/templateoptions-small.png" alt="templateoptions small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">To customize Code Templates:</p> -<p class="tableblock">1. Choose Tools > Options > Editor > Code Templates. -2. From the Language drop down list, select Java (or whichever language you want to create a code template for). The list of abbreviations and associated templates is displayed. -3. Use the New and Remove buttons to add or remove templates in the list. To edit an existing template, select the template and edit the code in the Expanded Text field below the list. -4. Choose the key which will be used to expand the templates. The default key is <code>Tab</code> .</p> -<p class="tableblock">See <a href="http://wiki.netbeans.org/Java_EditorUsersGuide#How_to_use_Code_Templates">this document</a> to know more about the syntax for writing new Code Templates.</p> -<p class="tableblock">See also <a href="../php/code-templates.html">Code Templates in NetBeans IDE for PHP</a>.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/templateoptions.png"><img src="images/templateoptions-small.png" alt="templateoptions small"></a> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>To customize Code Templates:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Choose Tools > Options > Editor > Code Templates.</p> +</li> +<li> +<p>From the Language drop down list, select Java (or whichever language you want to create a code template for). The list of abbreviations and associated templates is displayed.</p> +</li> +<li> +<p>Use the New and Remove buttons to add or remove templates in the list. To edit an existing template, select the template and edit the code in the Expanded Text field below the list.</p> +</li> +<li> +<p>Choose the key which will be used to expand the templates. The default key is <code>Tab</code> .</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>See <a href="http://wiki.netbeans.org/Java_EditorUsersGuide#How_to_use_Code_Templates">this document</a> to know more about the syntax for writing new Code Templates.</p> +</div> <div class="paragraph"> -<p><a href="#top">top</a></p> +<p>See also <a href="../php/code-templates.html">Code Templates in NetBeans IDE for PHP</a>.</p> </div> </div> </div> @@ -478,111 +552,105 @@ </div> <div class="sect3"> <h4 id="_displaying_javadoc">Displaying Javadoc</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/javadoc.png" alt="javadoc"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Place the cursor on an element and press <code>Ctrl-Shift-Space (or choose Source > Show Documentation)</code> . The Javadoc for this element is displayed in a popup window.</p> -<p class="tableblock">In the IDE’s main menu, click Window > IDE Tools > Javadoc Documentation to open the Javadoc window, in which the documentation is refreshed automatically for the location of your cursor.</p> -<p class="tableblock"> </p> -<p class="tableblock"> </p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/javadoc.png" alt="javadoc"> +</div> +</div> +<div class="paragraph"> +<p>Place the cursor on an element and press <code>Ctrl-Shift-Space (or choose Source > Show Documentation)</code> . The Javadoc for this element is displayed in a popup window.</p> +</div> +<div class="paragraph"> +<p>In the IDE’s main menu, click Window > IDE Tools > Javadoc Documentation to open the Javadoc window, in which the documentation is refreshed automatically for the location of your cursor.</p> +</div> </div> <div class="sect3"> <h4 id="_creating_javadoc_stubs">Creating Javadoc Stubs</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/javadoc1.png" alt="javadoc1"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Place the cursor above a method or a class that has no Javadoc, type <code>"/**</code> ", and press <code>Enter</code> .</p> -<p class="tableblock">The IDE creates a skeletal structure for a Javadoc comment filled with some content. If you have a Javadoc window open, you will see the changes immediately while you are typing.</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/javadoc1.png" alt="javadoc1"> +</div> +</div> +<div class="paragraph"> +<p>Place the cursor above a method or a class that has no Javadoc, type <code>"/**</code> ", and press <code>Enter</code> .</p> +</div> +<div class="paragraph"> +<p>The IDE creates a skeletal structure for a Javadoc comment filled with some content. If you have a Javadoc window open, you will see the changes immediately while you are typing.</p> +</div> </div> <div class="sect3"> <h4 id="_using_javadoc_hints">Using Javadoc Hints</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/javadoc2.png" alt="javadoc2"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">The IDE displays hints when Javadoc is missing or Javadoc tags are needed.</p> -<p class="tableblock">Click the bulb icon on the lefthand margin of the editor to fix Javadoc errors.</p> -<p class="tableblock">If you do not want to see the hints related to Javadoc, choose Tools > Options > Editor > Hints, and clear the Javadoc checkbox in the list of hints that are displayed.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/javadoc2.png" alt="javadoc2"> +</div> +</div> +<div class="paragraph"> +<p>The IDE displays hints when Javadoc is missing or Javadoc tags are needed.</p> +</div> +<div class="paragraph"> +<p>Click the bulb icon on the lefthand margin of the editor to fix Javadoc errors.</p> +</div> +<div class="paragraph"> +<p>If you do not want to see the hints related to Javadoc, choose Tools > Options > Editor > Hints, and clear the Javadoc checkbox in the list of hints that are displayed.</p> +</div> </div> <div class="sect3"> <h4 id="_using_code_completion_for_javadoc_tags">Using Code Completion for Javadoc Tags</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/javadoc3.png" alt="javadoc3"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Code completion is available for Javadoc tags.</p> -<p class="tableblock">Type the "@" symbol and wait until the code completion window opens (depending on your settings, you may need to press <code>Ctrl-Space</code> ).</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/javadoc3.png" alt="javadoc3"> +</div> +</div> +<div class="paragraph"> +<p>Code completion is available for Javadoc tags.</p> +</div> +<div class="paragraph"> +<p>Type the "@" symbol and wait until the code completion window opens (depending on your settings, you may need to press <code>Ctrl-Space</code> ).</p> +</div> </div> <div class="sect3"> <h4 id="_generating_javadoc">Generating Javadoc</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/generate.png" alt="generate"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">To generate Javadoc for a project, choose Run > Generate Javadoc menu item (or right-click the project in the Projects window and choose Generate Javadoc). The IDE will generate the Javadoc and open it in a separate browser window.</p> -<p class="tableblock">In the example on the left, you can see a sample output of the Generate Javadoc command. If there are some warnings or errors, they are also displayed in this window.</p> -<p class="tableblock">To customize Javadoc formatting options, right-click the project, choose Properties and open the Documenting panel under the Build category (available on Java projects only). For information about the options on this panel, click the Help button in this window.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/generate.png" alt="generate"> +</div> +</div> +<div class="paragraph"> +<p>To generate Javadoc for a project, choose Run > Generate Javadoc menu item (or right-click the project in the Projects window and choose Generate Javadoc). The IDE will generate the Javadoc and open it in a separate browser window.</p> +</div> +<div class="paragraph"> +<p>In the example on the left, you can see a sample output of the Generate Javadoc command. If there are some warnings or errors, they are also displayed in this window.</p> +</div> +<div class="paragraph"> +<p>To customize Javadoc formatting options, right-click the project, choose Properties and open the Documenting panel under the Build category (available on Java projects only). For information about the options on this panel, click the Help button in this window.</p> +</div> </div> <div class="sect3"> <h4 id="_analyzing_javadoc">Analyzing Javadoc</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/analyze-javadoc.png" alt="analyze javadoc"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">To identify the places in your code that need Javadoc comments and quickly insert these comments, you can use the Javadoc Analyzer tool available in the Java Editor.</p> -<p class="tableblock">To analyze and fix Javadoc comments:</p> -<p class="tableblock">1. Select a project, a package, or an individual file and choose Tools > Analyze Javadoc from the main menu. -The Analyzer window displays suggestions for adding or fixing Javadoc comments, depending on the scope of your selection. -2. Select one or several checkboxes where you would like to fix Javadoc and click the Fix Selected button. -3. Click Go Over Fixed Problems and use the Up and Down arrows to actually add your comments. This might be helpful if you selected to fix several instances at once and now want to revisit the stubs.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/analyze-javadoc.png" alt="analyze javadoc"> +</div> +</div> +<div class="paragraph"> +<p>To identify the places in your code that need Javadoc comments and quickly insert these comments, you can use the Javadoc Analyzer tool available in the Java Editor.</p> +</div> <div class="paragraph"> -<p><a href="#top">top</a></p> +<p>To analyze and fix Javadoc comments:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Select a project, a package, or an individual file and choose Tools > Analyze Javadoc from the main menu. The Analyzer window displays suggestions for adding or fixing Javadoc comments, depending on the scope of your selection.</p> +</li> +<li> +<p>Select one or several checkboxes where you would like to fix Javadoc and click the Fix Selected button.</p> +</li> +<li> +<p>Click Go Over Fixed Problems and use the Up and Down arrows to actually add your comments. This might be helpful if you selected to fix several instances at once and now want to revisit the stubs.</p> +</li> +</ol> </div> </div> </div> @@ -593,479 +661,603 @@ The Analyzer window displays suggestions for adding or fixing Javadoc comments, </div> <div class="sect3"> <h4 id="_using_hints_to_fix_code">Using Hints to Fix Code</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/quickfixes.png" alt="quickfixes"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">For the most common coding mistakes, you can see hints in the lefthand margin of the Editor. The hints are shown for many types of errors, such as missing field and variable definitions, problems with imports, braces, and other. Click the hint icon and select the fix to add.</p> -<p class="tableblock">Hints are displayed automatically by default. However, if you want to view all hints, choose Source > Fix Code (or press Alt-Enter).</p> -<p class="tableblock">For example, try typing "myBoolean=true". The editor detects that this variable is not defined. Click the hint icon and see that the Editor suggests that you create a field, a method parameter, or a local variable. Select</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/quickfixes.png" alt="quickfixes"> +</div> +</div> +<div class="paragraph"> +<p>For the most common coding mistakes, you can see hints in the lefthand margin of the Editor. The hints are shown for many types of errors, such as missing field and variable definitions, problems with imports, braces, and other. Click the hint icon and select the fix to add.</p> +</div> +<div class="paragraph"> +<p>Hints are displayed automatically by default. However, if you want to view all hints, choose Source > Fix Code (or press Alt-Enter).</p> +</div> +<div class="paragraph"> +<p>For example, try typing "myBoolean=true". The editor detects that this variable is not defined. Click the hint icon and see that the Editor suggests that you create a field, a method parameter, or a local variable. Select</p> +</div> </div> <div class="sect3"> <h4 id="_customizing_hints">Customizing Hints</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/customizehints.png"><img src="images/customizehints-small.png" alt="customizehints small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">You might want to limit the number of categories for which hints are displayed. To do this:</p> -<p class="tableblock">1. Choose Tools > Options > Editor > Hints. -2. From the Language drop-down list, select Java and view a list of elements for which hints are displayed (their checkboxes are selected). -3. To disable hints for some categories, clear the appropriate checkboxes.</p> -<p class="tableblock">Note: On the Hints tab, you can also disable or limit the scope of dependency scans (Dependency Scanning option). These steps can significantly improve the performance of the IDE.</p> -<p class="tableblock">The IDE detects compilation errors in your Java sources by locating and recompiling classes that depend on the file that you are modifying (even if these dependencies are in the files that are not opened in the editor). When a compilation error is found, red badges are added to source file, package, or project nodes. Dependency scanning within projects can be resource consuming and degrade performance, especially if you are working with large projects.</p> -<p class="tableblock">To improve IDE’s performance, you can do one of the following:</p> -<p class="tableblock">* Limit the scope of dependency scans to the Source Root (search for dependencies only in the source root where the modified class is located) or current Project. -* Disable dependency scanning (choose Project Properties > Build > Compiling and deselect the Track Java Dependencies option). In this case, the IDE does not scan for dependencies or updates the error badges when you modify a file.</p></td> -</tr> -</tbody> -</table> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/customizehints.png"><img src="images/customizehints-small.png" alt="customizehints small"></a> </div> -<div class="sect3"> -<h4 id="_surround_with">Surround With…​</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/surroundwith.png" alt="surroundwith"></span></p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can easily surround pieces of your code with various statements, such as <code>for</code> , <code>while</code> , <code>if</code> , <code>try/catch</code> , and other.</p> -<p class="tableblock">Select a block in your code that you want to surround with a statement and click the bulb icon in the lefthand margin (or press Alt-Enter). The editor displays a list of suggestions from which you select the statement you need.</p></td> -</tr> -</tbody> -</table> </div> </div> -<div class="sect2"> -<h3 id="_general_editor_features">General Editor Features</h3> -<div class="sect3"> -<h4 id="_code_formatting">Code Formatting</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/formatting.png"><img src="images/formatting-small.png" alt="formatting small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Choose Source > Format or press <code>Alt-Shift-F</code> to format the entire file or a selection of code. The IDE formats the code in accordance with the specified formatting settings.</p> -<p class="tableblock">To customize the formatting settings for Java code:</p> -<p class="tableblock">1. Choose Tools > Options > Editor > Formatting. -2. From the Language drop-down list, select Java. -3. From the Category drop-down list, select the category that you would like to customize. For example, you can customize the number of blank lines, the size of tabs and indentation, wrapping style, etc. -4. Modify the rules for the selected category and preview the result.</p></td> -</tr> -</tbody> -</table> +</div> +<div class="paragraph"> +<p>You might want to limit the number of categories for which hints are displayed. To do this:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Choose Tools > Options > Editor > Hints.</p> +</li> +<li> +<p>From the Language drop-down list, select Java and view a list of elements for which hints are displayed (their checkboxes are selected).</p> +</li> +<li> +<p>To disable hints for some categories, clear the appropriate checkboxes.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>Note: On the Hints tab, you can also disable or limit the scope of dependency scans (Dependency Scanning option). These steps can significantly improve the performance of the IDE.</p> +</div> +<div class="paragraph"> +<p>The IDE detects compilation errors in your Java sources by locating and recompiling classes that depend on the file that you are modifying (even if these dependencies are in the files that are not opened in the editor). When a compilation error is found, red badges are added to source file, package, or project nodes. Dependency scanning within projects can be resource consuming and degrade performance, especially if you are working with large projects.</p> +</div> +<div class="paragraph"> +<p>To improve IDE’s performance, you can do one of the following:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Limit the scope of dependency scans to the Source Root (search for dependencies only in the source root where the modified class is located) or current Project.</p> +</li> +<li> +<p>Disable dependency scanning (choose Project Properties > Build > Compiling and deselect the Track Java Dependencies option). In this case, the IDE does not scan for dependencies or updates the error badges when you modify a file.</p> +</li> +</ul> +</div> +</div> +<div class="sect3"> +<h4 id="_surround_with">Surround With…​</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/surroundwith.png" alt="surroundwith"> +</div> +</div> +<div class="paragraph"> +<p>You can easily surround pieces of your code with various statements, such as <code>for</code> , <code>while</code> , <code>if</code> , <code>try/catch</code> , and other.</p> +</div> +<div class="paragraph"> +<p>Select a block in your code that you want to surround with a statement and click the bulb icon in the lefthand margin (or press Alt-Enter). The editor displays a list of suggestions from which you select the statement you need.</p> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_general_editor_features">General Editor Features</h3> +<div class="sect3"> +<h4 id="_code_formatting">Code Formatting</h4> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/formatting.png"><img src="images/formatting-small.png" alt="formatting small"></a> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>Choose Source > Format or press <code>Alt-Shift-F</code> to format the entire file or a selection of code. The IDE formats the code in accordance with the specified formatting settings.</p> +</div> +<div class="paragraph"> +<p>To customize the formatting settings for Java code:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Choose Tools > Options > Editor > Formatting.</p> +</li> +<li> +<p>From the Language drop-down list, select Java.</p> +</li> +<li> +<p>From the Category drop-down list, select the category that you would like to customize. For example, you can customize the number of blank lines, the size of tabs and indentation, wrapping style, etc.</p> +</li> +<li> +<p>Modify the rules for the selected category and preview the result.</p> +</li> +</ol> +</div> </div> <div class="sect3"> <h4 id="_inserting_and_highlighting_braces_brackets_and_quotes">Inserting and Highlighting Braces, Brackets, and Quotes</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/braces.png" alt="braces"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">By default, the IDE automatically inserts matching pairs of braces, brackets, and quotes. When you type an opening curly brace and then press <code>Enter</code> , the closing brace is added automatically. For <code>(</code> , <code>[</code> , <code>"</code> , and <code>'</code> , the editor inserts a matching pair right away.</p> -<p class="tableblock">If, for some reason, this feature is disabled, enable it as follows:</p> -<p class="tableblock">1. Choose Tools > Options > Editor > Code Completion. -2. Select the Insert Closing Brackets Automatically checkbox.</p> -<p class="tableblock">The editor also highlights matching pairs of braces, brackets and quotes. For example, place the cursor before any brace or bracket and, if it has a matching pair, both will be highlighted in yellow. Single brackets of any type are highlighted in red and the error mark is displayed in the lefthand margin.</p> -<p class="tableblock">To customize the highlight colors, choose Tools > Options > Editor > Highlighting.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/braces.png" alt="braces"> +</div> +</div> +<div class="paragraph"> +<p>By default, the IDE automatically inserts matching pairs of braces, brackets, and quotes. When you type an opening curly brace and then press <code>Enter</code> , the closing brace is added automatically. For <code>(</code> , <code>[</code> , <code>"</code> , and <code>'</code> , the editor inserts a matching pair right away.</p> +</div> +<div class="paragraph"> +<p>If, for some reason, this feature is disabled, enable it as follows:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Choose Tools > Options > Editor > Code Completion.</p> +</li> +<li> +<p>Select the Insert Closing Brackets Automatically checkbox.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>The editor also highlights matching pairs of braces, brackets and quotes. For example, place the cursor before any brace or bracket and, if it has a matching pair, both will be highlighted in yellow. Single brackets of any type are highlighted in red and the error mark is displayed in the lefthand margin.</p> +</div> +<div class="paragraph"> +<p>To customize the highlight colors, choose Tools > Options > Editor > Highlighting.</p> +</div> </div> <div class="sect3"> <h4 id="_code_folding">Code Folding</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/code-folded2.png" alt="code folded2"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">In the Java Editor, you can quickly collapse and expand blocks of code, such as method declaration, Javadoc comments, import statements, etc. Collapsible blocks are shown with gray lines and plus/minus signs near the lefthand margin of the editor.</p> -<p class="tableblock">* The easiest way to collapse a block of code is to click the gray lines with a minus character in the lefthand margin. -* The number of lines within the collapsed block are shown, as well as the first line of a collapsed block of Javadoc comments. -* To fold all collapsible blocks in a file, right-click in the editor and choose Code Folds > Collapse All from the pop-up menu. -* From the Code Folds > Collapse All pop-up menu, you can choose to collapse all Javadoc comments or all Java code in a file. -* You can mouse over the folded elements to quickly review the hidden parts.</p> -<p class="tableblock">To customize the code folding options:</p> -<p class="tableblock">1. Choose Tools > Options > Editor > Folding. -2. To disable code folding, clear Enable Code Folding. Note that code folding is enabled by default. -3. Select the blocks of code to be collapsed by default when you open a file.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/code-folded2.png" alt="code folded2"> +</div> +</div> +<div class="paragraph"> +<p>In the Java Editor, you can quickly collapse and expand blocks of code, such as method declaration, Javadoc comments, import statements, etc. Collapsible blocks are shown with gray lines and plus/minus signs near the lefthand margin of the editor.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The easiest way to collapse a block of code is to click the gray lines with a minus character in the lefthand margin.</p> +</li> +<li> +<p>The number of lines within the collapsed block are shown, as well as the first line of a collapsed block of Javadoc comments.</p> +</li> +<li> +<p>To fold all collapsible blocks in a file, right-click in the editor and choose Code Folds > Collapse All from the pop-up menu.</p> +</li> +<li> +<p>From the Code Folds > Collapse All pop-up menu, you can choose to collapse all Javadoc comments or all Java code in a file.</p> +</li> +<li> +<p>You can mouse over the folded elements to quickly review the hidden parts.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>To customize the code folding options:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>Choose Tools > Options > Editor > Folding.</p> +</li> +<li> +<p>To disable code folding, clear Enable Code Folding. Note that code folding is enabled by default.</p> +</li> +<li> +<p>Select the blocks of code to be collapsed by default when you open a file.</p> +</li> +</ol> +</div> +</div> +<div class="sect3"> +<h4 id="_customizing_keyboard_shortcuts">Customizing Keyboard Shortcuts</h4> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/keyboard.png"><img src="images/keyboard-small.png" alt="keyboard small"></a> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>In the NetBeans IDE, choose Tools > Options > Keymap to customize keyboard shortcuts. You can do this in several ways:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Select a predefined set of keyboard shortcuts, which is called Profile.</p> +</li> +<li> +<p>Edit particular keyboard shortcuts.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>You can save customized sets of your shortcuts as profiles. Then, you can switch from one profile to another to quickly change multiple settings. For example, to create a custom profile of keyboard shortcuts:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>In the Options > Keymap window, click Manage profiles.</p> +</li> +<li> +<p>Select the profile you want to use as a base for your new profile and click Duplicate.</p> +</li> +<li> +<p>Enter the new profile name and click OK.</p> +</li> +<li> +<p>Ensure that the new profile is selected and modify the shortcuts you need. +To edit a shortcut, double-click in the Shortcut field or click the ellipsis button (…​). As you press the sequence of keys, the syntax for them is added. +If you want to add special characters, such as <code>Tab</code> , <code>Escape</code> , or <code>Enter</code> , click the ellipsis button (…​) again and select the key from the pop-up window.</p> +</li> +<li> +<p>When finished editing, click OK in the Options window.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>To find a shortcut for a specific command, type the command name in the Search field. To find a command by a combination, insert the cursor in the Search in Shortcuts field and press the shortcut key combination.</p> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_semantic_coloring_and_highlighting">Semantic Coloring and Highlighting</h3> +<div class="paragraph"> +<p>The IDE’s Java Editor shows code elements in distinct colors, based on the semantics of your code. With semantic coloring, it becomes easier for you to identify various elements in your code. In addition to coloring, the Java Editor highlights similar elements with a particular background color. Thus, you can think of the highlighting feature as an alternative to the Search command, because in combination with error stripes, it gives you a quick overview of where the highlighted [...] +</div> +<div class="sect3"> +<h4 id="_customizing_colors">Customizing Colors</h4> +<div class="openblock feature"> +<div class="content"> +<div class="imageblock left"> +<div class="content"> +<a class="image" href="images/coloringoptions.png"><img src="images/coloringoptions-small.png" alt="coloringoptions small"></a> +</div> +</div> +</div> +</div> +<div class="paragraph"> +<p>To customize semantic coloring settings for the Java Editor, choose Tools > Options > Fonts & Colors.</p> +</div> +<div class="paragraph"> +<p>The IDE provides several preset coloring schemes, which are called profiles. You can create new profiles with custom colors and quickly switch between them.</p> +</div> +<div class="paragraph"> +<p>It is very convenient to save custom colors in new profiles. For example, do the following:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>In the Options > Fonts & Colors window, click Duplicate next to the Profile drop-down list.</p> +</li> +<li> +<p>Enter the new profile name and click OK.</p> +</li> +<li> +<p>Ensure that the new profile is currently selected and choose Java from the Language drop-down list.</p> +</li> +<li> +<p>Select a category and change the font, font color (Foreground), background color, and effects for this category. Use the Preview window to view the results.</p> +</li> +<li> +<p>Click OK.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>Note: All NetBeans IDE settings and profiles are stored in the <em>NetBeans userdir</em> (refer to the <a href="http://wiki.netbeans.org/FaqWhatIsUserdir">FAQ</a> on how to locate the <em>userdir</em> for your operating system). When upgrading to newer versions of NetBeans, you can export old settings and import them to the newer version.</p> +</div> +<div class="paragraph"> +<p>To export the IDE settings:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>In the Options window (Tools > Options), click Export.</p> +</li> +<li> +<p>Specify the location and name of the ZIP file that will be created.</p> +</li> +<li> +<p>Select the settings that you want to export and click OK.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>To import the IDE settings:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>In the Options window (Tools > Options), click Import.</p> +</li> +<li> +<p>Specify the ZIP file with IDE settings or path to the <em>userdir</em> from a previous version.</p> +</li> +<li> +<p>Select the settings that you want to import and click OK.</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p> +==== Coloring Example</p> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/coloring.png" alt="coloring"> +</div> +</div> +<div class="paragraph"> +<p>In the left, you can see an example of a coloring scheme. Depending on your custom settings, your colors might look differently than those shown in the screenshot.</p> +</div> +<div class="paragraph"> +<p>Distinct colors are used for keywords (blue), variables and fields (green), and parameters (orange).</p> +</div> +<div class="paragraph"> +<p>References to deprecated methods or classes are shown as strikethrough. This warns you when you are going to write code that relies on deprecated members.</p> +</div> +<div class="paragraph"> +<p>Unused members are underlined with a gray wavy line. Comments are displayed in gray.</p> +</div> +<div class="paragraph"> +<p> +==== Using Highlights</p> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/highlightelement.png" alt="highlightelement"> +</div> +</div> +<div class="paragraph"> +<p>The IDE highlights usages of the same element, matching braces, method exit points, and exception throwing points.</p> +</div> +<div class="paragraph"> +<p>If you place the cursor in an element, such as a field or a variable, all usages of this element are highlighted. Note that error stripes in the Editor’s righthand margin indicate the usages of this element in the entire source file (see <a href="#stripes">Error Stripes</a>). Click the error stripe to quickly navigate to the desired usage location.</p> +</div> +<div class="paragraph"> +<p>If you decide to rename all the highlighted instances, use the Instant Rename command (Ctrl-R or choose Refactor > Rename).</p> +</div> +<div class="paragraph"> +<p> +=== Navigation</p> +</div> +<div class="paragraph"> +<p>The Java Editor provides numerous ways of how you can navigate through code. See below for several examples that show the navigation features of the Java Editor.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_error_stripes">Error Stripes</h4> +<div class="paragraph"> +<p>Error stripes in the righthand margin of the editor provide a quick overview of all marked places in the current file: errors, warnings, hints, highlighted occurrences, and annotations. Note that the error stripe margin represents an entire file, not just the part that is currently displayed in the editor. By using error stripes, you can immediately identify whether your file has any errors or warnings, without scrolling through the file.</p> +</div> +<div class="paragraph"> +<p>Click an error stripe to jump to the line that the mark refers to.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_navigating_from_the_editor_go_to">Navigating From the Editor: Go To…​</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/gotodeclaration.png" alt="gotodeclaration"> +</div> +</div> +<div class="paragraph"> +<p>Use the following the "Go To.." commands located under the Navigate menu item to quickly jump to target locations:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Go To Declaration (Ctrl-B, by default)</strong>. Hold down the Ctrl key and click the usage of a class, method, or field to jump to its declaration. You can also place the cursor on the member (a class, method, or field) and choose Navigate > Go To Declaration or right-click and choose Navigate > Go To Declaration from the pop-up menu.</p> +</li> +<li> +<p><strong>Go To Source (Ctrl-Shift-B, by default)</strong>. Hold down the Ctrl key and click a class, method, or field to jump to the source code, if the source is available. You can also place the cursor on the member (a class, method, or field) and either press Ctrl-Shift-B or choose Navigate > Go To Source in the main menu.</p> +</li> +</ul> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/gototype.png" alt="gototype"> +</div> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Go To Type (Ctrl-O)</strong>, <strong>Go To File (Alt-Shift-O),</strong> and <strong>Go To Symbol (Ctrl-Alt-Shift-O)</strong>. If you know the name of the type (class, interface, annotation or enum), file, or symbol to where you want to jump, use these commands and type the name in the new window. Notice that you can use prefixes, camel case, and wildcards.</p> +</li> +</ul> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/gotoline.png" alt="gotoline"> +</div> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Go To Line (Ctrl-G)</strong>. Enter the line number to which you want to jump.</p> +</li> +<li> +<p><strong>Go To Bookmark (Ctrl-G Ctrl-G)</strong>. Enables you to jump to a bookmark based on a key assigned to it in the Bookmarks window. (See the <a href="#bookmarks">Bookmarks</a> section for details.)</p> +</li> +</ul> +</div> +</div> +<div class="sect3"> +<h4 id="_jumping_to_last_edit">Jumping to Last Edit</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/jumplastedit.png" alt="jumplastedit"> +</div> +</div> +<div class="paragraph"> +<p>To quickly return to your last edit, even if it is in another file or project, press Ctrl-Q or use the button in the top left corner of the Java Editor toolbar. The last edited document opens, and the cursor is at the position, which you edited last.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_using_breadcrumbs">Using Breadcrumbs</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/breadcrumbs.png" alt="breadcrumbs"> +</div> +</div> +<div class="paragraph"> +<p>Breadcrumbs are shown along the bottom of the editor.</p> +</div> +<div class="paragraph"> +<p>The place where the cursor is found in the document determines the breadcrumbs displayed.</p> +</div> +<div class="paragraph"> +<p>Show/hide breadcrumbs from View | Show Breadcrumbs.</p> +</div> +<div class="paragraph"> +<p>Click on an arrow associated with a breadcrumb to see all available class members and select to jump to them.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_switching_between_files">Switching Between Files</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/jumprecentfile.png" alt="jumprecentfile"> +</div> +</div> +<div class="paragraph"> +<p> +There are two very handy features that allow you to switch between open files:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Go Back (Alt-Left)</strong> and <strong>Go Forward (Alt-Right).</strong> To go to the previously edited file or move forward, choose Navigate < Back or Navigate < Forward or press the corresponding buttons on the editor toolbar (shown in the figure). The file opens and the cursor is placed at the location of your last edit. When you click one of these buttons, you can expand the list of the recent files and click to navigate to any of them.</p> +</li> +</ul> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/togglefile.png" alt="togglefile"> +</div> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Toggle Between Files (Ctrl-Tab)</strong>. After you press Ctrl-Tab, all open files are shown in a pop-up window. Hold down the Ctrl key and press several times the Tab key to choose the file you would like to open.</p> +</li> +</ul> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/shift-f4.png" alt="shift f4"> +</div> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>Show Open Documents (Shift-F4)</strong>. After you press Shift-F4, all open files are shown in the Documents window. Order the files based on your needs and choose the file you would like to open.</p> +</li> +</ul> +</div> </div> <div class="sect3"> -<h4 id="_customizing_keyboard_shortcuts">Customizing Keyboard Shortcuts</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/keyboard.png"><img src="images/keyboard-small.png" alt="keyboard small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">In the NetBeans IDE, choose Tools > Options > Keymap to customize keyboard shortcuts. You can do this in several ways:</p> -<p class="tableblock">* Select a predefined set of keyboard shortcuts, which is called Profile. -* Edit particular keyboard shortcuts.</p> -<p class="tableblock">You can save customized sets of your shortcuts as profiles. Then, you can switch from one profile to another to quickly change multiple settings. For example, to create a custom profile of keyboard shortcuts:</p> -<p class="tableblock">1. In the Options > Keymap window, click Manage profiles. -2. Select the profile you want to use as a base for your new profile and click Duplicate. -3. Enter the new profile name and click OK. -4. Ensure that the new profile is selected and modify the shortcuts you need. -To edit a shortcut, double-click in the Shortcut field or click the ellipsis button (…​). As you press the sequence of keys, the syntax for them is added. -If you want to add special characters, such as <code>Tab</code> , <code>Escape</code> , or <code>Enter</code> , click the ellipsis button (…​) again and select the key from the pop-up window. -5. When finished editing, click OK in the Options window.</p> -<p class="tableblock">To find a shortcut for a specific command, type the command name in the Search field. To find a command by a combination, insert the cursor in the Search in Shortcuts field and press the shortcut key combination.</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<h4 id="_using_bookmarks">Using Bookmarks</h4> +<div class="imageblock"> +<div class="content"> +<img src="images/bookmark.png" alt="bookmark"> </div> </div> -<div class="sect2"> -<h3 id="_semantic_coloring_and_highlighting">Semantic Coloring and Highlighting</h3> <div class="paragraph"> -<p>The IDE’s Java Editor shows code elements in distinct colors, based on the semantics of your code. With semantic coloring, it becomes easier for you to identify various elements in your code. In addition to coloring, the Java Editor highlights similar elements with a particular background color. Thus, you can think of the highlighting feature as an alternative to the Search command, because in combination with error stripes, it gives you a quick overview of where the highlighted [...] +<p>You can use bookmarks to quickly navigate through certain places in your code.</p> </div> -<div class="sect3"> -<h4 id="_customizing_colors">Customizing Colors</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/coloringoptions.png"><img src="images/coloringoptions-small.png" alt="coloringoptions small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">To customize semantic coloring settings for the Java Editor, choose Tools > Options > Fonts & Colors.</p> -<p class="tableblock">The IDE provides several preset coloring schemes, which are called profiles. You can create new profiles with custom colors and quickly switch between them.</p> -<p class="tableblock">It is very convenient to save custom colors in new profiles. For example, do the following:</p> -<p class="tableblock">1. In the Options > Fonts & Colors window, click Duplicate next to the Profile drop-down list. -2. Enter the new profile name and click OK. -3. Ensure that the new profile is currently selected and choose Java from the Language drop-down list. -4. Select a category and change the font, font color (Foreground), background color, and effects for this category. -Use the Preview window to view the results. -5. Click OK.</p> -<p class="tableblock">Note: All NetBeans IDE settings and profiles are stored in the <em>NetBeans userdir</em> (refer to the <a href="http://wiki.netbeans.org/FaqWhatIsUserdir">FAQ</a> on how to locate the <em>userdir</em> for your operating system). When upgrading to newer versions of NetBeans, you can export old settings and import them to the newer version.</p> -<p class="tableblock">To export the IDE settings:</p> -<p class="tableblock">1. In the Options window (Tools > Options), click Export. -2. Specify the location and name of the ZIP file that will be created. -3. Select the settings that you want to export and click OK.</p> -<p class="tableblock">To import the IDE settings:</p> -<p class="tableblock">1. In the Options window (Tools > Options), click Import. -2. Specify the ZIP file with IDE settings or path to the <em>userdir</em> from a previous version. -3. Select the settings that you want to import and click OK.</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<div class="paragraph"> +<p>Press Ctrl-Shift-M (or right-click the left margin and choose Bookmark > Toggle Bookmark) to bookmark the current line. The bookmarked line is shown with a small blue icon in the left margin (see the figure).</p> </div> -<div class="sect3"> -<h4 id="_coloring_example">Coloring Example</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/coloring.png" alt="coloring"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">In the left, you can see an example of a coloring scheme. Depending on your custom settings, your colors might look differently than those shown in the screenshot.</p> -<p class="tableblock">Distinct colors are used for keywords (blue), variables and fields (green), and parameters (orange).</p> -<p class="tableblock">References to deprecated methods or classes are shown as strikethrough. This warns you when you are going to write code that relies on deprecated members.</p> -<p class="tableblock">Unused members are underlined with a gray wavy line. Comments are displayed in gray.</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<div class="paragraph"> +<p>To remove the bookmark, press Ctrl-Shift-M again.</p> </div> -<div class="sect3"> -<h4 id="_using_highlights">Using Highlights</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/highlightelement.png" alt="highlightelement"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">The IDE highlights usages of the same element, matching braces, method exit points, and exception throwing points.</p> -<p class="tableblock">If you place the cursor in an element, such as a field or a variable, all usages of this element are highlighted. Note that error stripes in the Editor’s righthand margin indicate the usages of this element in the entire source file (see <a href="#stripes">Error Stripes</a>). Click the error stripe to quickly navigate to the desired usage location.</p> -<p class="tableblock">If you decide to rename all the highlighted instances, use the Instant Rename command (Ctrl-R or choose Refactor > Rename).</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/bookmark2.png" alt="bookmark2"> </div> </div> -<div class="sect2"> -<h3 id="_navigation">Navigation</h3> <div class="paragraph"> -<p>The Java Editor provides numerous ways of how you can navigate through code. See below for several examples that show the navigation features of the Java Editor.</p> +<p>To go to the next bookmark, press Ctrl-Shift-Period, to go to the previous bookmark, press Ctrl-Shift-Comma.</p> </div> -<div class="sect3"> -<h4 id="_error_stripes">Error Stripes</h4> <div class="paragraph"> -<p>Error stripes in the righthand margin of the editor provide a quick overview of all marked places in the current file: errors, warnings, hints, highlighted occurrences, and annotations. Note that the error stripe margin represents an entire file, not just the part that is currently displayed in the editor. By using error stripes, you can immediately identify whether your file has any errors or warnings, without scrolling through the file.</p> +<p>Automatically a popup appears, letting you move forward and backward via Ctrl-Shift-Period and Ctrl-Shift-Comma.</p> </div> <div class="paragraph"> -<p>Click an error stripe to jump to the line that the mark refers to.</p> +<p>Release the keyboard to select the current item in the list, which will cause the editor to open the file at the line where the bookmark is found.</p> </div> +<div class="openblock feature"> +<div class="content"> +<div class="paragraph"> +<p><span class="image left"><a class="image" href="images/bookmark3.png"><img src="images/bookmark3-small.png" alt="bookmark3 small"></a></span></p> </div> -<div class="sect3"> -<h4 id="_navigating_from_the_editor_go_to">Navigating From the Editor: Go To…​</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/gotodeclaration.png" alt="gotodeclaration"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Use the following the "Go To.." commands located under the Navigate menu item to quickly jump to target locations:</p> -<p class="tableblock">* <strong>Go To Declaration (Ctrl-B, by default)</strong>. Hold down the Ctrl key and click the usage of a class, method, or field to jump to its declaration. You can also place the cursor on the member (a class, method, or field) and choose Navigate > Go To Declaration or right-click and choose Navigate > Go To Declaration from the pop-up menu. -* <strong>Go To Source (Ctrl-Shift-B, by default)</strong>. Hold down the Ctrl key and click a class, method, or field to jump to the source code, if the source is available. You can also place the cursor on the member (a class, method, or field) and either press Ctrl-Shift-B or choose Navigate > Go To Source in the main menu.</p></td> -</tr> -</tbody> -</table> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/gototype.png" alt="gototype"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">* <strong>Go To Type (Ctrl-O)</strong>, <strong>Go To File (Alt-Shift-O),</strong> and <strong>Go To Symbol (Ctrl-Alt-Shift-O)</strong>. If you know the name of the type (class, interface, annotation or enum), file, or symbol to where you want to jump, use these commands and type the name in the new window. Notice that you can use prefixes, camel case, and wildcards.</p></td> -</tr> -</tbody> -</table> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/gotoline.png" alt="gotoline"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">* <strong>Go To Line (Ctrl-G)</strong>. Enter the line number to which you want to jump. -* <strong>Go To Bookmark (Ctrl-G Ctrl-G)</strong>. Enables you to jump to a bookmark based on a key assigned to it in the Bookmarks window. (See the <a href="#bookmarks">Bookmarks</a> section for details.)</p></td> -</tr> -</tbody> -</table> </div> -<div class="sect3"> -<h4 id="_jumping_to_last_edit">Jumping to Last Edit</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/jumplastedit.png" alt="jumplastedit"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">To quickly return to your last edit, even if it is in another file or project, press Ctrl-Q or use the button in the top left corner of the Java Editor toolbar. The last edited document opens, and the cursor is at the position, which you edited last.</p></td> -</tr> -</tbody> -</table> </div> -<div class="sect3"> -<h4 id="_using_breadcrumbs">Using Breadcrumbs</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/breadcrumbs.png" alt="breadcrumbs"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Breadcrumbs are shown along the bottom of the editor.</p> -<p class="tableblock">The place where the cursor is found in the document determines the breadcrumbs displayed.</p> -<p class="tableblock">Show/hide breadcrumbs from View</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Show Breadcrumbs.</p> -<p class="tableblock">Click on an arrow associated with a breadcrumb to see all available class members and select to jump to them.</p></td> -</tr> -</tbody> -</table> +<div class="paragraph"> +<p>You can view all bookmarks throughout all your projects and manage them.</p> </div> -<div class="sect3"> -<h4 id="_switching_between_files">Switching Between Files</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/jumprecentfile.png" alt="jumprecentfile"></span></p> -<p class="tableblock"> </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">There are two very handy features that allow you to switch between open files:</p> -<p class="tableblock">* <strong>Go Back (Alt-Left)</strong> and <strong>Go Forward (Alt-Right).</strong> To go to the previously edited file or move forward, choose Navigate < Back or Navigate < Forward or press the corresponding buttons on the editor toolbar (shown in the figure). The file opens and the cursor is placed at the location of your last edit. When you click one of these buttons, you can expand the list of the recent files and click to navigate to any of them.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/togglefile.png" alt="togglefile"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">* <strong>Toggle Between Files (Ctrl-Tab)</strong>. After you press Ctrl-Tab, all open files are shown in a pop-up window. Hold down the Ctrl key and press several times the Tab key to choose the file you would like to open.</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/shift-f4.png" alt="shift f4"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">* <strong>Show Open Documents (Shift-F4)</strong>. After you press Shift-F4, all open files are shown in the Documents window. Order the files based on your needs and choose the file you would like to open.</p></td> -</tr> -</tbody> -</table> +<div class="paragraph"> +<p>When the <Bookmarks> item is selected in the popup shown above or when Window | IDE Tools | Bookmarks is selected, the Bookmarks window opens.</p> +</div> +<div class="paragraph"> +<p>Two views are provided for viewing bookmarks and you can view the related code in a preview window.</p> +</div> +<div class="paragraph"> +<p>In the Table view, you can assign keys to bookmarks so that when <code>Ctrl-G</code> is pressed twice, you can quickly jump to a bookmark in your code.</p> </div> -<div class="sect3"> -<h4 id="_using_bookmarks">Using Bookmarks</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/bookmark.png" alt="bookmark"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can use bookmarks to quickly navigate through certain places in your code.</p> -<p class="tableblock">Press Ctrl-Shift-M (or right-click the left margin and choose Bookmark > Toggle Bookmark) to bookmark the current line. The bookmarked line is shown with a small blue icon in the left margin (see the figure).</p> -<p class="tableblock">To remove the bookmark, press Ctrl-Shift-M again.</p></td> -</tr> -</tbody> -</table> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/bookmark2.png" alt="bookmark2"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">To go to the next bookmark, press Ctrl-Shift-Period, to go to the previous bookmark, press Ctrl-Shift-Comma.</p> -<p class="tableblock">Automatically a popup appears, letting you move forward and backward via Ctrl-Shift-Period and Ctrl-Shift-Comma.</p> -<p class="tableblock">Release the keyboard to select the current item in the list, which will cause the editor to open the file at the line where the bookmark is found.</p></td> -</tr> -</tbody> -</table> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">[.feature] — <span class="image left"><a class="image" href="images/bookmark3.png"><img src="images/bookmark3-small.png" alt="bookmark3 small"></a></span> — </p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">You can view all bookmarks throughout all your projects and manage them.</p> -<p class="tableblock">When the <Bookmarks> item is selected in the popup shown above or when Window</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">IDE Tools</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Bookmarks is selected, the Bookmarks window opens.</p> -<p class="tableblock">Two views are provided for viewing bookmarks and you can view the related code in a preview window.</p> -<p class="tableblock">In the Table view, you can assign keys to bookmarks so that when <code>Ctrl-G</code> is pressed twice, you can quickly jump to a bookmark in your code.</p></td> -</tr> -</tbody> -</table> </div> <div class="sect3"> <h4 id="_using_the_navigator">Using the Navigator</h4> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top"><span class="image"><img src="images/navigatorwindow.png" alt="navigatorwindow"></span></th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">The Navigator window provides structured views of the file you are working with and lets you quickly navigate between different parts of the file.</p> -<p class="tableblock">To open the Navigator window, choose Window > Navigator or press Ctrl-7.</p> -<p class="tableblock">In the Navigator window, you can do the following:</p> -<p class="tableblock">* Choose between different views: Members, Bean Patterns, Trees, Elements, etc. -* Double-click an element to jump to the line where it is defined. -* Right-click an element and apply commands, such as Go to Source, Find Usages, and Refactor. -* Apply filters to the elements displayed in the Navigator (use the buttons at the bottom). -* Type the name of the element that you want to find (the Navigator window must be active).</p> -<p class="tableblock"> </p></td> -</tr> -</tbody> -</table> -<table class="tableblock frame-all grid-all spread"> -<colgroup> -<col style="width: 100%;"> -</colgroup> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/navigatorwindow2.png" alt="navigatorwindow2"></span></p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">When the Navigator is active, type the name of the element that you want to find.</p> -<p class="tableblock">Matching items are highlighted.</p> -<p class="tableblock">You can move to matching items by pressing the Up and Down arrow keys.</p></td> -</tr> -</tbody> -</table> +<div class="imageblock"> +<div class="content"> +<img src="images/navigatorwindow.png" alt="navigatorwindow"> +</div> +</div> <div class="paragraph"> -<p><a href="/about/contact_form.html?to=3&subject=Feedback:%20Code%20Assistance%20in%20the%20NetBeans%20IDE%20Java%20Editor%20for%208.0">Send Feedback on This Tutorial</a></p> +<p>The Navigator window provides structured views of the file you are working with and lets you quickly navigate between different parts of the file.</p> +</div> +<div class="paragraph"> +<p>To open the Navigator window, choose Window > Navigator or press Ctrl-7.</p> +</div> +<div class="paragraph"> +<p>In the Navigator window, you can do the following:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Choose between different views: Members, Bean Patterns, Trees, Elements, etc.</p> +</li> +<li> +<p>Double-click an element to jump to the line where it is defined.</p> +</li> +<li> +<p>Right-click an element and apply commands, such as Go to Source, Find Usages, and Refactor.</p> +</li> +<li> +<p>Apply filters to the elements displayed in the Navigator (use the buttons at the bottom).</p> +</li> +<li> +<p>Type the name of the element that you want to find (the Navigator window must be active).</p> +</li> +</ul> +</div> +<div class="imageblock"> +<div class="content"> +<img src="images/navigatorwindow2.png" alt="navigatorwindow2"> +</div> +</div> +<div class="paragraph"> +<p>When the Navigator is active, type the name of the element that you want to find.</p> +</div> +<div class="paragraph"> +<p>Matching items are highlighted.</p> +</div> +<div class="paragraph"> +<p>You can move to matching items by pressing the Up and Down arrow keys.</p> </div> </div> </div> @@ -1084,26 +1276,25 @@ Use the Preview window to view the results. </li> </ul> </div> -<div class="paragraph"> -<p><a href="#top">top</a></p> -</div> </div> <div class="sect2"> <h3 id="_appendix_a_icons_in_the_code_completion_window">Appendix A: Icons in the Code Completion Window</h3> <table class="tableblock frame-all grid-all spread"> <colgroup> -<col style="width: 25%;"> -<col style="width: 25%;"> -<col style="width: 25%;"> -<col style="width: 25%;"> +<col style="width: 12.5%;"> +<col style="width: 37.5%;"> +<col style="width: 12.5%;"> +<col style="width: 37.5%;"> </colgroup> -<tbody> +<thead> <tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">Icon</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Meaning</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Variants (if any)</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Meaning</p></td> +<th class="tableblock halign-left valign-top">Icon</th> +<th class="tableblock halign-left valign-top">Meaning</th> +<th class="tableblock halign-left valign-top">Variants (if any)</th> +<th class="tableblock halign-left valign-top">Meaning</th> </tr> +</thead> +<tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="images/annotation_type.png" alt="annotation type"></span></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Annotation type</p></td> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists