Saturday May 23, 2009
Java Code Completion Enhancements in NetBeans IDE 6.7
This is what the Options window looked like in NetBeans IDE 6.5 and 6.5.1:
In 6.7, things will change slightly. The screenshot below is taken from a 6.7 build. Notice that there is a new subtab within the "Editor" tab. The subtab has "Code Completion" in the tab's label:
The "Code Completion" settings from the 6.5 Options window, that were in the "General" tab", are now in the new "Code Completion" tab. They're the same as before, available for all languages. However, in addition to those options, there is a new set specifically for Java, as you can see in the screenshot above.
And this is what they mean:
- Guess Filled Method Arguments. When selected, code completion tries to insert a variable available in the current context as the method argument. Otherwise, the supplied name is derived from the method signature. Here's an example scenario:
Character cccc = null; System.out.appen| //invoke CC, choose 'append(Char c)'
When the option is ON, the result is as follows:
System.out.append(cccc);
Otherwise:
System.out.append(c);
- Auto Popup Triggers for Java. Defines the patterns upon which code completion will appear. For example, you might want the introduction of a new opening parenthesis or comma to trigger code completion, so that related method parameters can be shown.
- Auto Popup on Typing Any Java Identifier Part. Specifies that code completion be shown whenever a new Java identifier part has been entered.
- Completion Selectors for Java. Defines the characters that confirm the current selection in the code completion box. Upon one of the selectors being pressed, the current item in the code completion box is selected and entered in the editor, with the selector appearing after it.
- Exclude/Include. Lets you limit what is shown in the code completion box.
- Auto Popup Triggers for Javadoc. Defines the patterns upon which code completion box shows up inside Javadoc comments.
Pretty cool enhancements to improve your coding pleasure.
May 23 2009, 11:32:06 AM PDT Permalink
NetBeans does not provide other language specified configuration.
But code complementation setting is only provided in Java language.
For example , xml , many xml editor provide options like "auto generate close tag","auto generate mandatory attribute for tag".
Posted by hantsy on May 24, 2009 at 08:50 PM PDT #
NetBeans provides closing tag via CTRL+Space anywhere after the start tag. If not, then try to type </ and hit Ctrl+Space.
NetBeans provides not only that, but checks + validates your xml, xsl or whatever.


