« Return to Thread: simple xml editor
text/???+xml
are used in the IDE to represent an XML document. Creating a filetype
like this, IDE will treat your files as an XML
document. Netbeans Editor will provide all functionality like code
highlighting, indent, code folding, code completion and any other to
your xml document. CookieSet cookies = getCookieSet();To get the Navigator support for your xml files Add following code in your layer.xml file (with your xml MIME type)
cookieManager = new DataObjectCookieManager(this, cookies);
cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
InputSource is = DataObjectAdapters.inputSource(this);
Source source = DataObjectAdapters.source(this);
cookies.add(new CheckXMLSupport(is));
cookies.add(new ValidateXMLSupport(is));
cookies.add(new TransformableSupport(source));
<folder name="Navigator">Thanks & Regards,
<folder name="Panels">
<folder name="text">
<folder name="MIME_TYPE">
<file name="org-netbeans-modules-xml-text-navigator-XMLNavigatorPanel.instance"/>
</folder>
</folder>
</folder>
</folder>
Hello.
I'd like to develop a simple xml editor based on netbeans platform for a particular xml schema, something like the ide has for the web.xml file.
Just the explorer, the navigator, the editor and the output window.
I have to say that even though I've been using netbeans since early 2001 for java development, I'm a beginner with module development.
I just started working on the module with netbeans ide 5.0 (but tomorrow I'll upgrade to 5.5) and using the wizard, have already made a new file type for my xml namespace.
Launching the new application, I see that my xml files are recognized, as the icon I set for this file type is shown.
The first problem is that the new fileType seams to not have inherited all the functionalities used for xml files.
1) the well formed and validate buttons in the editor are disabled.
2) the navigator doesn't show anything
But the editor still uses highlighting and colors..
Of course, when editing an xml file that doesn't use an xml schema the well formed and validate buttons are again enabled and the
navigator again shows its content.
How can I add all features present for plain xml files to my file type?
I also would appreciate any hints and directions you could give me on how to implement the editor (wizards, apis, files to edit, etc..)
Best regards.
--
Roberto
« Return to Thread: simple xml editor
| Free embeddable forum powered by Nabble | Forum Help |