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:




  • 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.


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 01: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.

Posted by Peter on May 25, 2009 at 05:34 AM PDT #


Posted by subtitle on June 05, 2009 at 02:27 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016