eclipse preference store "hasChanged" any way to set that, so as to prompt user if he hits 'cancel' or 'X' button?
I have a preference page with text boxes and a list. User makes some changes and hits 'Cancel' or presses 'X' to close the window. I want to pop a dialog to the user that "There are unsaved changes. Are you sure you want to exit?" something like that.

There is a method in preferencesStore `needsSaving()`. I dont know how that works. It gives `false` every time. I tried `putValue()` instead of `setValue()` but that too stores it to the preference store. It should be somewhere "intermediate" so that I revert if user presses cancel to the prompt. 


eclipse preference store "hasChanged" any way to set that, so as to prompt user if he hits 'cancel' or 'X' button?
===

I have a preference page with text boxes and a list. User makes some changes and hits 'Cancel' or presses 'X' to close the window. I want to pop a dialog to the user that "There are unsaved changes. Are you sure you want to exit?" something like that.

There is a method in preferencesStore `needsSaving()`. I dont know how that works. It gives `false` every time. I tried `putValue()` instead of `setValue()` but that too stores it to the preference store. It should be somewhere "intermediate" so that I revert if user presses cancel to the prompt. 

