/** Set the descriptor. */ private void setDescriptor( IPropertyDescriptor newDescriptor) { // if our descriptor is changing, we have to get rid // of our current editor if there is one if (descriptor != newDescriptor && editor != null) { editor.dispose(); editor = null; } descriptor = newDescriptor; } /*
public void dispose() { if (editor != null) { editor.dispose(); editor = null; } // recursive call to dispose children if (childEntries != null) for (int i = 0; i < childEntries.length; i++) { // an error in a property source may cause refreshChildEntries // to fail. Since the Workbench handles such errors we // can be left in a state where a child entry is null. if (childEntries[i] != null) childEntries[i].dispose(); } }
/* * (non-Javadoc) Method declared on IPropertySheetEntry. */ public void dispose() { if (editor != null) { editor.dispose(); editor = null; } // recursive call to dispose children PropertySheetEntry[] entriesToDispose = childEntries; childEntries = null; if (entriesToDispose != null) { for (int i = 0; i < entriesToDispose.length; i++) { // an error in a property source may cause refreshChildEntries // to fail. Since the Workbench handles such errors we // can be left in a state where a child entry is null. if (entriesToDispose[i] != null) { entriesToDispose[i].dispose(); } } } }