Rhizomorph wrote:
I am trying to register a property editor for a particular class type by using the PropertyEditorManager.registerEditor(...) function, but Netbeans doesn't seem to pay attention to it and never uses the editor. I should say two things right off the bat:
The Property Editor that I am trying to use DOES work - I know this for a fact, and I can successfully use this exact same editor class IF I specify it in the BeanInfo file.
The call to registerEditor() in the static block IS getting executed. And when I later call PropertyEditorManager.findEditor(MyEnum.class), it returns a property editor of the correct class.
However, despite the fact that MyEnum is obviously being linked to the correct editor, Netbeans doesn't actually use that editor. Moreover, when I try to ask Netbeans what the property editor is by referring to a particular property via the descriptor, it returns NULL. Here's an example...
Agree with David - try putting your registration code in a ModuleInstall, to be sure it really gets registered before anybody asks for a property sheet from a node for your bean.
I'd also suggest perhaps not using BeanNode (which I'm guessing you are); then you have complete control over the property editors for your property objects...
-Tim