VOOZH about

URL: https://www.javacodegeeks.com/2015/10/ctrl1-in-the-eclipse-xml-editor.html

โ‡ฑ Ctrl+1 in the Eclipse XML Editor - Java Code Geeks


The XML Editor is included in several of the Eclipse IDE downloads. It has two view modes: in design mode, you can edit your XML as a tree; in source mode, you edit as text. By default, it opens in design mode, which may seem a little weird (Iโ€™ve added Bug 480036 to the list of EclipseCon Europe 2015 Hackathon bugs to consider changing this).

I use the XML editor infrequently, but it is based on the same technology as the HTML and PHP Editors (which has embedded HTML support) that I use pretty regularly. All three of these editors have a cool feature that I didnโ€™t know existed until today.
 
 
 
๐Ÿ‘ output

Put the cursor inโ€”or highlight the text ofโ€”a tag (either the open or the close tag), and hit ctrl+1. Select โ€œRename in fileโ€ and type a new tag. Both the open and close tags are updated in one. Just like the similar functionality provided by the Java development tools, this is sensitive to context (i.e. it will change the right closing tag).

This is certainly more handy for XML editing, but I did manage to shave a few seconds off my day using it to convert <ol>..</ol> to <ul>..</ul> in some HTML. #littleVictories

For completeness, the XML Editor is already included in  the following Mars Eclipse IDE Packages:

  • Eclipse IDE for Java EE Developers
  • Eclipse IDE for Java Developers
  • Eclipse IDE for PHP Developers
  • Eclipse IDE for Java and DSL Developers
  • Eclipse IDE for RCP and RAP Developers
  • Eclipse IDE for Automotive Software Developers
  • Eclipse IDE for Java and Report Developers
  • Eclipse IDE for Parallel Application Developers

You can add the XML Editor to any Eclipse IDE by adding the โ€œEclipse XML Editor and Toolsโ€ feature from the Mars repository.

Thanks to Konstantin Komissarchik for compiling the list of IDEs and to Nitin Dahyabhai for highlighting the functionality.

Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

๐Ÿ‘ Photo of Wayne Beaton
Wayne Beaton
October 21st, 2015Last Updated: October 21st, 2015
0 109 1 minute read
Back to top button
Close
wpDiscuz