This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently it is necessary when one wants to provide additional attributes to ExPropertyEditor to either use Nodes or write beanInfo for own object. Because this is a common task, this should be simplified as much as possible. There is a constructor new DefaultPropertyModel (bean, propertyName) right now that uses beaninfo to find the right PropertyDescriptor. The suggestion is to add new constructor: new DefaultPropertyModel (bean, featureDescriptor) so one could use: PropertyDescriptor pd = new PropertyDescriptor ("myProperty", bean.getClass ()); pd.setPropertyEditorClass (PropertyEditorManager.findEditor (Object.class)); pb.setValue ("superClass", MyProperty.class); model = new DefaultPropertyModel (bean, pd); panel = new PropertyPanel (model); Which is much simpler than writing own bean info.
Created attachment 4757 [details] Suggested patch
Implemented in OpenIDE >= 2.4
I'm testing it just now and it seems to work nice :-) Thanks.
Created attachment 4766 [details] A NPE I got.
I got the attached exception. It seems to be related to the change performed. Thus reopening..
Also the property editor sets the selected service immediately. On cancel it sets it back to the original one, but I think, that this is not necessary is it?
Fixed. Ad. immedite change see http://www.netbeans.org/download/apis/org/openide/explorer/propertysheet/PropertyPanel.html#setChangeImmediate(boolean)
This issue had *1 votes* before move to platform component