Announcement Announcement Module
Collapse
No announcement yet.
When does BeansXMLEditor start? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X