Re: [xml-dev] tree editor syntax completion and more... ready for checkin
"Libor Kramolis" <[email protected]> Sat, 30 Nov 2002 15:45:08 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.xml.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, however I am no longer Sun employee I still monitor NetBeans XML project. And I must say I love Rich's contribution. +1 from me I hope I will be back as right external contributor soon. Best regards, Libor > Rich Unger wrote: > > Petr, everyone, thanks for all your help. I've got this beast > > Actually Libor coded majority of tree editor and TAX. > > > finished, and I'd like to start checking it into the trunk! I don't > > want to do something this huge, however, without going through it with > > you guys first. > > > > First of all, it consists of: > > > > 30 new java files > > a few new Bundle files > > a new dtd > > > > and patches to 6 java files. > > It will be the fourth major contribution to NetBeans XML > module. (Sandeep Singh Randhawa, Asgeir Orn Asgeirsson, > Rich Unger and Sun Microsystem Inc) > > > Here's a detailed overview of what it all does: > > > > * The 'add' context menu on an ElementNode now uses GrammarQuery to > > figure out the list of child elements allowed by the dtd or schema. > > If no help is available, it will default to the old behavior. > > Great I call it code completion in XML tree editor. It's > great usability improvement! > > > * Moved the 'add' item to the top of the context menu. > > Until making it default action i.e. Node contains a code > that delegates to the first action if no explicit default > action is set. Minor tweak. > > > * Created a pluggable framework for 3 aspects of the GUI: > > 1. The icon that appears next to each element in the tree > > 2. The text that accompanies the element's icon > > 3. The customizer (the right pane) > > > > This can all be customized by module authors wanting to create a > > module to edit a particular doctype. For example, someone creating a > > "MusicXML" module may want the customizer for the <pitch> element to > > show a clickable music scale. Also, the icon for the <pitch> element > > could be a musical note, and the text next to the icon could indicate > > the value. > > > > The customization is done completely declaratively, in an xml file. > > If anything is unspecified in this xml file, the default is identical > > to the old behavior. (You can specify a new customizer, for example, > > but leave the icon and text alone. Likewise, you can decide to > > override the behavior of just one element.) > > Very powerfull. What parameter Customizer.setObject() takes? > Adam Sotona, test tools developer, is looking forward it quite > a lot. > > > * Included a propertysheet customizer for the above framework which is > > a workalike of the org.openide.explorer.propertysheet package, but > > edits attributes of an xml element instead of java bean properties. > > It uses simple String property editors for each element, or a > > drop-down list if the DTD/schema specifies an enumerated list of > > allowable values. Also, this propertysheet customizer can co- exist > > with other customizers in a JTabbedPane. > > > > * Prevent the creation of attribute nodes in the tree view. Our > > usability testers felt they cluttered up the tree, and were easier to > > edit in the right pane, anyway. If there's significant objection to > > this, I suppose we could make it a setting. > > It looks fine to me. Tree visualization of attributes was choosen > because it allows add and remove attributes. It can be handled > by special "<not specified>" value in property editor. > > > So, what do you think? Shall I check it in? > > I cannot judge as I have not got new nbm under my fingers, BUT > above description looks really great. Go ahead. > > +1 from my side > > Cc. > > -- > <address> > <a href="mailto:[email protected]">Petr Kuzel</a> at Sun Microsystems : > <a href="http://performance.netbeans.org/">IDE performance</a></address> > > > -------------------------------------------------------------------- - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >