Of them all, I've looked most closely at the latter of the three, recently. The basic framework of a visualizer can be extracted from that blog entry. Then one needs to incorporate some way of parsing the source in question. For HTML, you'd need some kind of HTML parser, etc. (By the way, the NetBeans APIs provide an HTML parser too, did you know that? See the HTML Lexer API, and the isHyperlinkPoint class in the NetBeans Hyperlink Navigation Tutorial.) If you want to parse XML files, see the NetBeans XML Editor Extension Module Tutorial, because that tutorial includes complete code for an XML parser. For parsing Java source files, the NetBeans Java Language Infrastructure Tutorial is incredibly useful. By combining the code from that tutorial with the information from Damir Tesanovic's blog entry, I made a visualizer for Java source files:
The visual scene shows information about the constructor, methods, and fields of a class. The scene is created when you right-click inside a Java source file and choose "Visualize". Then a new TopComponent opens, with a Visual Library API scene created within it, and then the nodes are added to the scene, with the pins added to the nodes.
If you are creating a visualizer, I recommend working backwards through the three blog entries listed above. Start with the one by Damir Tesanovic, then the one by Toni Epple, and then look through the one by Vadiraj Deshpande.
Will you be releasing this as a netbeans module?
Maybe I'm mistaken, but I think the Reverse Engineer menu item on Java files (i.e., this is UML) does the job already. Or do you need this for something specific, 160.91.44.54?
Hi Geertjan, am sorry this comment is off the topic but i saw the DJ Native swing project and was hoping for a netbeans plugin that can allow one to preview HTML files within Netbeans so that as I edit in Netbeans, I can click on a button and then a tab showing the preview of my HTML opens that uses the DJ component internally. Any such thing in perspective soon? Will it be trivial to build
Hi I have put something together but I dont know how to continue from thier. Please provide me links on how I can trigger editor action, write clean-up code when an editor is closed.
I have a screenshot at http://blog.dabarobjects.com/?p=27
Thanks
Can you send me all your sources in a ZIP? I've created the other half...
Actually, why don't you read the blog entries I referred to above? The one by Damir Tesanovic should give you everything you need.
I have uploaded the zip of what I have here http://www.dabarobjects.com/downloads/DJHTMLViewer.zip. Actually my headache has being how to plug in the NativeCode Initialization routine which is supposed to be called at the init of the GUI application. I used ModuleInstall but it is not yet stable, it loads up, works a bit and the test platform stops responding after a while. I think you may also need to get the DJ libraries to resolve the project dependencies
Thanks. Looking at your code now. See my today's blog entry for my progress, but using a different 3rd party library.
It's going to take me some time to set up the DJ native browser and then to learn how to use it. Hoping to do it by the end of the weekend. Hope that's acceptable. In general though, my guess is you shouldn't be using a module installer at all. But that's just a guess.