int returnValue = dialog.open();
//based on user actions either reset defaults or open preference dialog
if (restoreId == returnValue || settingsId == returnValue) {
if (restoreId == returnValue) {
propertiesExtension.loadDefaults();
propertiesExtension.saveConfiguration();
}
if (settingsId == returnValue) {
PreferencesUtil.createPreferenceDialogOn(shell,
propertiesExtension.getPropertiesPageID(), null, null).open();