Project: mulestudio
Issue STUDIO-618:  Namespaces in the XML view are not being removed when you remove all the elements of a kind
When you add an element and then you remove it, the reference to the schema file is not being removed from the XML namespaces. Steps to reproduce: 1.- Create a project in Studio with a flow in it and go to the Global Elements tab. 2.- Add for example a global Jetty endpoint with the default values. 3.- Go to the XML view and check that the xml code for the endpoint is there with reference to the mule-jetty.xsd in the namespaces 4.- Go back to the global elements tab and delete the endpoint. Issue: Now if you go back to the XML view, the code for the endpoint is not there as ti should but the reference to the mule-jetty.xsd is still there and it shouldn't as there is no jetty element in the flow or in the global elements tab. Be very careful when implementing this as the reference in the namespaces should be remve if there is no other instance of the element kind in a flow or as a global element such as a global endpoint or connector, but if there is no reference to an element kind (ex: some jetty element) there is no reason for the namespace to be there.
Story points: 8