if (part != null) {
propertySheet.partClosed(part);
propertySheet.partActivated(part);
// lets check if we have created and initialised a different page instance in the activation...
IPage currentPage = propertySheet.getCurrentPage();
IPropertySheetPage selectionPage = page;
if (currentPage instanceof IPropertySheetPage) {
selectionPage = (IPropertySheetPage) currentPage;
// now lets dispose the old page we are not using