Add dynamic property to property sheet with multiple selection of objects

"GBeans" <[email protected]> Mon, 06 Jun 2016 06:46:33 +0000
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <[email protected]>
Hi,

I have included the netbeans property sheet in one of my projects (RELEASE 81).

I have a custom property editor for one property which adds property dynamically (depending on the selection in the custom editor).

That's work fine when I select only one object : after I click on OK in the custom editor, the properties are added via an inherated class of ValueNodeProperty<T>. Then, I call the propertyChange on each node :

Code:
@Override
	public void propertyChange(PropertyChangeEvent evt) {
		updateDisplayName();
		firePropertyChange(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue());
		setSheet(createSheet());
	}



But with multiple objects, it doesn't seem to work. Everything works as for the single selection, but I think the problem comes from the ProxyNode class that is used for multiple selections. Indeed, when I deselect the objects, then I reselect them,  the new property appears in the property sheet.

The ProxyNode class does not receive the notification of a change, and I don't know how to access it to send it the notification.

Thanks