Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Problem with JFace PreferenceDialog class


PreferenceManager and PreferenceDialog are JFace classes.
Please ask JFace questions on the eclipse platform newsgroup:
news://news.eclipse.org/eclipse.platform


Thanks,
Carolyn



"Thilo Brandt" <swt@xxxxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

11/13/2004 02:43 PM

Please respond to
platform-swt-dev

To
<platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Problem with JFace PreferenceDialog class





Hi together,

when calling the following coding twice in my application:

Display display = new Display();

// create a PreferenceManager
PreferenceManager mgr = new PreferenceManager();

// assign nodes to PreferenceManager
IPreferenceNode n = new PreferenceNode("page1", new SamplePreferencePage());
mgr.addToRoot(n);

// create a PreferenceDialog
PreferenceDialog dlg = new PreferenceDialog(new Shell(display), mgr);
dlg.setPreferenceStore(new PreferenceStore());

dlg.open();
display.dispose();

... I got the following exception:

java.lang.NullPointerException
                at
org.eclipse.jface.preference.PreferenceDialog.createTitleArea(PreferenceDial
og.java:421)
                at
org.eclipse.jface.preference.PreferenceDialog.createDialogArea(PreferenceDia
log.java:378)
                at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:632)
                at
org.eclipse.jface.preference.PreferenceDialog.access$3(PreferenceDialog.java
:1)
                at
org.eclipse.jface.preference.PreferenceDialog$3.run(PreferenceDialog.java:30
7)
                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
                at
org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialo
g.java:305)
                at org.eclipse.jface.window.Window.create(Window.java:348)
                at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:925)
                at org.eclipse.jface.window.Window.open(Window.java:637)
                at
de.powerisdnmonitor.ui.jface.configuration.ConfigurationCommand.execute(Conf
igurationCommand.java:47)


Is this a bug or do I have to change/add something in my coding? I used the
libraries (jar files) from the JDT 3.0.1 build.
Any hints are recommended.

BTW, is there a good source with code snippets/examples for JFace like for
SWT?

Best regards,
Thilo


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top