« Return to Thread: simple xml editor

Re: simple xml editor

by Vitezslav Stejskal :: Rate this Message:

Reply to Author | View in Thread

Roberto Nunnari wrote:
> 1) the well formed and validate buttons in the editor are disabled.
I think you need to add CheckXMLSupport and ValidateXMLSupport cookies
to your DataObject. Here is a wiki page describing how to do that -
http://wiki.netbeans.org/wiki/view/DevFaqNewXMLFileType.

> 2) the navigator doesn't show anything
You probably need to register a navigator panel implementation for your
mime type. I think you could reuse the panel registered for text/xml
files. The registration will have to be done on your XML layer and
should be looking something like this:

<folder name="Navigator">
  <folder name="Panels">
    <folder name="text">
      <folder name="your-mime-type">
        <file
name="org-netbeans-modules-xml-text-navigator-XMLNavigatorPanel.instance"/>
      </folder>
    </folder>
  </folder>
</folder>

Just for a reference here is a description of Navigator API -
http://www.netbeans.org/download/dev/javadoc/org-netbeans-spi-navigator/index.html?overview-summary.html.
You probably won't need it unless you want to implement your own
navigator panel.

Good luck,
-vita

 « Return to Thread: simple xml editor