[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Dynamic preference nodes - SEVERE

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)...

adrian wrote:

> 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.