Daniel have worked with modular RCP platforms as are NetBeans and Eclipse, developed support for proprietary technology which is processing huge volumes of XML data. Now is working on Register of traffic accidents(J2EE application build on Websphere) for Ministry of Interior of the Slovak Republic. Daniel has posted 9 posts at DZone. You can read more from them at their website. View Full User Profile

Annoying XML Comments: NetBeans IDE Plugin

  • submit to reddit

Commenting XML ... you have to write "<!--" and then "-->" ,if you have to write some large doc, and want it be well commented, you'll get really bored by typing four chars just to start comment block.

I was little frustrated by the fact there is no tool(well there is as a hint but i like key shortcuts) in my beloved NetBeans IDE to comment/uncomment whole block of text (like the Java editor has), so i wrote it down.

EDIT: It's useless "Ctrl-/" does the same for XML. See official short-cut list, its hidden in "Coding in Java" but works for many other file types.

Download it for free right here:


It's simple, select text which you want to comment, right click for context menu and select "XML Comment" like the figure below shows.

Context menu

Your rating: None Average: 5 (1 vote)
Published at DZone with permission of its author, Daniel Kec.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Daniel Kec replied on Mon, 2011/01/10 - 11:00am

Or the hint but the shortcut is shortcut.

Wouter van Reeven replied on Tue, 2011/01/11 - 3:51am


Good stuff!

In e.g. XHTML files you can comment out lines by selecting them and pressing CTRL-/. In what files doesn't this work so you wrote the plugin?


Wouter van Reeven

Daniel Kec replied on Tue, 2011/01/11 - 4:35am in response to: Wouter van Reeven

Well thanks, i thought that this only works in Java ... that fact make the plugin useless but also made me little smarter. Thanks

Jonathan Spooner replied on Tue, 2011/01/11 - 1:27pm

Ctrl+Shift+C does the same thing.

Peter Karussell replied on Tue, 2011/01/11 - 6:28pm

+1 Jonathan Spooner

Bikes Direct replied on Thu, 2011/08/11 - 11:56am

In Netbeans, however, this often results in the letter “s” being typed, either because the File menu didn’t drop down fast enough or the S key registered twice. I’ve never had this problem in any other program. -BikesDirect

Jessie Mear replied on Wed, 2011/09/07 - 8:04am

This tool creates a smooth migration path for students learning the Java programming language from beginner's stage through to the use of professional development tools. ruby on rails

Matt Coleman replied on Fri, 2011/11/18 - 12:31am in response to: Jessie Mear

I agree with you


buffalo website design

Ryan Fitz replied on Fri, 2011/11/18 - 1:02am in response to: Jonathan Spooner

it sure does do the same thing

 amish rifle shirts


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.