Community
Participate
Working Groups
From Eclipse Corner >> I'm adding a PreferenceNode dynamically. Going to "Window" -> >> "Preferences", it displays its page fine. Closing the "Preferences" now >> will dispose its preference page (the dialog is disposed, >> PreferenceNode.disposeResources() is called). Trying "Window" -> >> "Preferences" again will fail - my PreferenceNode is still there (as I >> want it to be), but its PreferencePage is gone (BAD)... >> >> When can I recreate the node's page?? Or, alternatively, avoid the >> disposing of its resources until I remove the node? I'm using R0.9. > I should mention that I use the PreferenceNode(String id, IPreferencePage > preferencePage) constructor - therefore PreferenceNode.label is always null > (so displaying the treeItem when the page is gone fails, as getTextLabel() > returns null), and createPage() is no good, as there is no > PreferenceNode.classname. > The PreferenceNode(String id, String label, ImageDescriptor image, String > className) constructor doesn't work - in createPage(), page = > (IPreferencePage)createObject(classname) fails (although it works fine when > I do it in my code, when extending PreferenceNode!?). Also, I prefer to use > the former constructor, i.e., have the PreferencePage instantiated by me > (with a custom constructor)... NOTES: RG (8/9/01 10:14:03 AM) We could consider keeping the pages but allowing them to dispose their widgets. Or we could make the preference node class abstract and force subclasses to implement a page creation method.
PRODUCT VERSION: 128
Needs investigation to see if this can be done in a non-breaking way.
It is important not to break existing code
Suggest defer until after 2.0 This API is an enhancement to JFace but we do not expect/want workbench plugins to do this.
JFace issue, not workbench. Defer
reopen for investigation
You actually can't recreate the page as all of the widgets will be parented off of a disposed Composite.