Editing and Refactoring

Java editor features in NetBeans IDE
Click image for fullscreen preview

The language-aware NetBeans editor detects errors while you type and assists you with documentation popups and smart code completion—all with the speed and simplicity of your favorite text editor.


Editors and File Templates

The editor in NetBeans IDE is much more than a text editor. The NetBeans editor indents lines, matches words and brackets, and highlights source code syntactically and semantically.

The editor supports several languages including Java, C/C++, XML, HTML, PHP, Groovy, CSS, and JavaScript. It can be extended to support other languages.

The IDE provides file templates for each of the technologies it supports, such as Java file templates, HTML file templates, and JavaScript file templates.

NetBeans Technology Learning Trails


Static Analysis

Live Parsing


The cost of buggy code increases the longer it remains unfixed. The IDE gives you static code analysis tools, in particular, integration with the popular open source Java FindBugs tool.

The IDE parses the source code live while you type. The editor marks errors, highlights occurrences, shows compiler hints, quick fixes, warnings, and language documentation.

The IDE's refactoring tools allow you to restructure code without breaking it. The Inspect & Transform tool enables you to run powerful inspections across your codebase, while automatically fixing your code.




The editor provides automatic code completion in several languages, including Java, C/C++, PHP, Groovy, XML, HTML, CSS, and JavaScript.

Navigate to any file, type, or symbol using standard text, camel case format, or wild cards, and do case sensitive searches throughout your codebase.

The editor can generate common code snippets for you within the editor. You can define code templates for common pieces of code and add record macros as you type.




The IDE performs source code analysis and offers an extensive set of hints to quickly fix or enhance your code.

Inspect the members and supertype or subtype hierarchies of any file in the Navigator window and Hierarchy window, which provide filters to control the level of detail displayed.

The behavior and display of the languages in the editor can be customized, including its code completion, documentation view, keyboard shortcuts, fonts, and colors.

See Also