Search code examples
xmleclipseeclipse-plugineclipse-mdt

Why create 'new xml file' option not exist?


I am using Eclipse Modeling Tools Version: Juno Service Release 2 Build id: 20130225-0426 for programming in Java

so, I would like to create new XML file as illustrated in the following link:

http://www.tutorialspoint.com/eclipse/eclipse_create_xml_file.htm

but this option not exist as you can see in the following figure.Why? I wonder if I missed something?

enter image description here


Solution

  • Yes, well, as you may be aware, there are several different eclipse packages/configuration, each specifically tailored to a specific purpose. And as you can see here, not all of them contain the same features out of the box - apparently in your case, the "Modelling Tools" package does not contain the "XML Editors and Tools" plugin, so the features included in it (e.g., creating xml files) are not available. They can be easily added though, like so:

    I downloaded the Juno SR2 "Modelling Tools" package for this, so it should be the same for you.

    1. Open Eclipse ^_^.
    2. Go to: Help > Install New Software
    3. In the "Work with" field (combo box) choose "Juno - http://download.eclipse.org/releases/juno".
    4. @"type filter text" type "xml" (without the quotes :P) and wait, might take some time to update...
    5. If not already like so, make sure "Show only latest versions of available software" is checked and "Group items by category" is unchecked(how i did it).
    6. In the list of items choose (check/tick) "Eclipse XML Editors and Tools" and click "Next".
    7. Click "Next" on the next screen again, the select the "I accept the terms of the license agreement" radio on the next one (you might want to read those first, though :P) and click "Finish" (Finally!).
    8. Wait for the plugin to install or click "Run in background" and keep working while it does (you won't be able to use the features 'til the install is completed though).
    9. When asked restart Eclipse.
    10. Congrats, you should now be able to create an XML File in the way specified in your tutorial ^_^!