Results 1 to 2 of 2

Thread: When does BeansXMLEditor start?

  1. #1

    Default When does BeansXMLEditor start?

    If you create a new beans config file in Eclipse, when does the BeansXMLEditor start working on it? I don't see this happening until you save and close the file and re-open it (after adding the doctype and the <beans> tag of course). Is this the behavior other people see as well?

    Seems to me it would be desireable to have the editor start working sooner, perhaps when the file is first saved and has the right DTD and <beans> tag.

    I've observed the same behavior with other Eclipse XML files, so I suspect the problem is not a Spring IDE bug.

  2. #2
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    Quote Originally Posted by Loren Rosen
    I don't see this happening until you save and close the file and re-open it (after adding the doctype and the <beans> tag of course). Is this the behavior other people see as well?
    Yes, this is the expected behaviour. WTP's XML editors (and BeansXmlEditor as well) are using the Eclipse extension point org.eclipse.core.runtime.contentTypes.

    The following code snippet is copied from BeansXmlEditor's plugin.xml:
    Code:
    <extension point="org.eclipse.core.runtime.contentTypes">
      <content-type id="beansConfig"
            name="%contentTypeName"
            base-type="org.eclipse.core.runtime.xml"
            priority="high"
            default-charset="UTF-8">
        <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
          <parameter name="element" value="beans"/>
        </describer>
      </content-type>
    </extension>
    By using this extension point an XML file with a specific root element is associated with a specialized XML editor instead using a list of file extensions only.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •