Re: [xml-dev] tree editor syntax completion and more... ready for checkin
Rich Unger <[email protected]> Fri, 06 Dec 2002 11:12:04 -0800
| Newsgroups | gmane.comp.java.netbeans.modules.xml.devel |
|---|---|
| Organization | CollabNet Hosting |
| Message-ID | <[email protected]> |
On Mon, 02 Dec 2002 16:18:18 +0100, Petr Kuzel <[email protected]> wrote: > >> * 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. > >I looked at impl and I would like to eliminate openide.explorer.propertysheet >copy&paste. I'd prefer openide developers removing hardcoded behaviour >if it exists. I scanned diff -u xml/propertysheet openide/propertysheet >and found: The most important difference is actually the files I _don't_ use. The xml propertysheet customizer is actually a hacked up PropertySheetTab, not a PropertySheet. I don't use the PropertySheet class at all. There's no notion of "Expert" xml element attributes. Instead, the tab is used in conjunction with other tabs which are not property sheets at all. > >PropertyPanel.java: 1) your code does not share painting settings > (using PropertySheetSettingsInvoker). Is it intention? > What is problem with shared painting settings? The painting settings were specified in the PropertySheet class. Now that I look at it, it seems those are just constants, though. Perhaps it could be refactored quite easily. It just wasn't a priority for me. >PropertySheetTab.java: 2) class made public with a contructor > taking Customizer that is not used, why? Ah, you're right. m_parent is not used. It used to be, in an earlier iteration. Also, PropertySheetCustomizer used to reside in a different package. Now, I suppose, the constuctor need not be public, so long as it's package-accessible. > 3) Node.PropertySet replaced by AttributeSet (a class emulating > properties over XML element attributes). > 4) setObject() is reimplemented attaching PropertyChangeListeners > to different sources. > >I think that only 4) may needs openide/propertysheet implementation >change. I'd think that 3 is a pretty fundamental difference as well. XML Element properties are not bean properties, and there's no notion in the openide propertysheet implementation of editing anything but bean properties. Rich