Exception when re-opening PrefenceDialog ? [message #435025] |
Tue, 09 August 2005 07:29 |
Eclipse User |
|
|
|
Originally posted by: eclipse.newsgroups.anegma.com
Hello,
working on my RCP application I get a serious problem with the
preference dialog. Once I start it (via an action), everything
is fine. But if I close the dialog and try again to open it
I get an exception:
org.eclipse.jface.util.Assert$AssertionFailedException: null argument;
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:149)
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:125)
This is the source with that I open the dialog:
public void run() {
if (parentWindow != null) {
PreferenceManager pm =
PlatformUI.getWorkbench().getPreferenceManager();
IPreferenceNode[] preferencePages = getPreferencePages();
for (int i = 0; i < preferencePages.length; i++) {
prefManager.addToRoot(preferencePages[i]);
}
if (prefManager != null) {
PreferenceDialog prefDialog =
new PreferenceDialog(parentWindow.getShell(), pm);
prefDialog.setPreferenceStore(
PlatformUI.getPreferenceStore());
prefDialog.create();
prefDialog.open();
}
for (int i = 0; i < preferencePages.length; i++) {
preferencePages[i].disposeResources();
}
}
}
If I remove the PreferenceManager from the Dialog I can open
the Dialog as often I want.
Does anyone knwo what I'm doing wrong here ??
- Gunnar Pietz
|
|
|
|
Powered by
FUDForum. Page generated in 0.03018 seconds