Over a million developers have joined DZone.

My Weekly NetBeans Tip (2): Comment/Uncomment XML Tags

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

My tip for this week is similar to my tip from last week. Last week I showed how to surround a selection of Java code with an editor fold. Now I will show how to surround a selection of XML tags with the uncomment tags. When you complete the steps in this tip, then whenever you select XML tags, you will automatically see the small yellow tip with one hint, for surrounding with uncomment:

When you select that hint, you will see this:

     

  1. Go to Tools | Options | Editor | Code templates.

  2. Select XML in the Language
  3. Click New, enter "un" as the abbreviation, then enter the following code as the expanded text:

    <!--
    ${selection line}${cursor}-->

  4. In the Description tab, enter "Uncomment", and click OK.

Now it will work like shown above. The tip is based on my previous tip. Hope you like it!

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}