Problem in PreferenceDialog [message #449618] |
Tue, 16 May 2006 22:08 |
Eclipse User |
|
|
|
Originally posted by: aschneid.onlinehome.de
Hi
I have a problem when calling the following from an RCP application:
PreferenceNode one = new PreferenceNode( "one", new FieldEditorPageOne());
PreferenceNode two = new PreferenceNode("two", "Logging", null,
FieldEditorPageTwo.class.getName());
The first one works, but when selecting the second page, I get the
following in the log:
!ENTRY org.eclipse.jface 4 2 2006-05-16 23:57:14.438
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.jface.preference.PreferenceNode.createPage(Prefe renceNode.java:161)
at
org.eclipse.jface.preference.PreferenceDialog.createPage(Pre ferenceDialog.java:1241)
What can be wrong?
Regards,
Achim
|
|
|
Re: Problem in PreferenceDialog [message #449633 is a reply to message #449618] |
Wed, 17 May 2006 11:53 |
|
asc wrote:
> Hi
> I have a problem when calling the following from an RCP application:
>
> PreferenceNode one = new PreferenceNode( "one", new FieldEditorPageOne());
>
> PreferenceNode two = new PreferenceNode("two", "Logging", null,
> FieldEditorPageTwo.class.getName());
>
> The first one works, but when selecting the second page, I get the
> following in the log:
>
> !ENTRY org.eclipse.jface 4 2 2006-05-16 23:57:14.438
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.jface".
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.jface.preference.PreferenceNode.createPage(Prefe renceNode.java:161)
If I had to guess, the PreferenceNode is returning null from the call to
createObject(classname) ... set a breakpoint in
PreferenceNode#createPage() and you can find out.
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Re: Problem in PreferenceDialog [message #449692 is a reply to message #449633] |
Wed, 17 May 2006 20:52 |
Eclipse User |
|
|
|
Originally posted by: aschneid.onlinehome.de
Paul Webster wrote:
>
> If I had to guess, the PreferenceNode is returning null from the call to
> createObject(classname) ... set a breakpoint in
> PreferenceNode#createPage() and you can find out.
>
> Later,
> PW
Paul,
yes, yes you are right - setting the breakpoint shows that the
createObject is failing because the classname somehow cannot be
resolved- but the question is why?
Regards,
Achim
|
|
|
|
Re: Problem in PreferenceDialog [message #449831 is a reply to message #449728] |
Sat, 20 May 2006 22:10 |
Eclipse User |
|
|
|
Originally posted by: aschneid.onlinehome.de
Paul Webster wrote:
> asc wrote:
>
>>
>> Paul,
>> yes, yes you are right - setting the breakpoint shows that the
>> createObject is failing because the classname somehow cannot be
>> resolved- but the question is why?
>
>
> your plugin depends on the jface plugin ... but that means that jface
> can't load a class from your plugin. That's why it fails.
>
> i.e. you can use that constructor in a java app using JFace+SWT, but not
> in a plugin, in RCP or Eclipse.
>
> Later,
> PW
Paul, (sorry, where on business trip)
do you mean its not possible at all? Or is there any way?
Regards
Achim
|
|
|
|
Powered by
FUDForum. Page generated in 0.04088 seconds