Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » PreferencePage via org.eclipse.ui.window.preferences: AssertionFailedException(Preferences Pages won't show because getFieldEditorParent() delivers null)
PreferencePage via org.eclipse.ui.window.preferences: AssertionFailedException [message #490160] Wed, 07 October 2009 15:14 Go to next message
Dagmar Buggle is currently offline Dagmar Buggle
Messages: 3
Registered: October 2009
Junior Member
Hi,
I've got a problem with including standard eclipse preferenes pages into my RCP project. I did everything as described in the tutorial of Lars vogel: http://tinyurl.com/ye5tvma

Trying to open the preference dialog from my application, I always get an error: .AssertionFailedException. Digging through the classes showed up that fieldEditorParent in mother class FieldEditorPreferencePage is ot properly initialized and getFieldEditorParent() returns null as can be seen in
    protected Composite getFieldEditorParent() {
        if (style == FLAT) {
            // Create a new parent for each field editor
            Composite parent = new Composite(fieldEditorParent, SWT.NULL);
            parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            return parent;
        }
        // Just return the parent
        return fieldEditorParent;
    }


I don't have any clue what is going wrong as I did copy the example from Lars' tutorial. I'm using 3.4. Anyone got a hint for me?
greetings,
Dagmar
Re: PreferencePage via org.eclipse.ui.window.preferences: AssertionFailedException [message #490247 is a reply to message #490160] Thu, 08 October 2009 05:13 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.
Messages: 621
Registered: July 2009
Senior Member
Dagmar Buggle wrote:

> ot properly initialized and getFieldEditorParent() returns null as can
> be seen in
>
> protected Composite getFieldEditorParent() {
> if (style == FLAT) {
> // Create a new parent for each field editor
> Composite parent = new Composite(fieldEditorParent, SWT.NULL);
> parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
> return parent;
> }
> // Just return the parent
> return fieldEditorParent;
> }

the fieldEditorParent is initialized in the createContents() method.
Are you overriding it?

The Extension Wizard also a sample to create a Preference Page. You can
also try that.

- Prakash

Platform UI Team, IBM
http://blog.eclipse-tips.com
Re: PreferencePage via org.eclipse.ui.window.preferences: AssertionFailedException [message #490494 is a reply to message #490160] Thu, 08 October 2009 20:06 Go to previous message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

I believe this is solved:
http://groups.google.de/group/vogella/browse_thread/thread/1 060e6c98dd23eb9

Cheers, Lars
--

Dagmar Buggle wrote:
> Hi,
> I've got a problem with including standard eclipse preferenes pages into
> my RCP project. I did everything as described in the tutorial of Lars
> vogel: http://tinyurl.com/ye5tvma
>
> Trying to open the preference dialog from my application, I always get
> an error: .AssertionFailedException. Digging through the classes showed
> up that fieldEditorParent in mother class FieldEditorPreferencePage is
> ot properly initialized and getFieldEditorParent() returns null as can
> be seen in
>
> protected Composite getFieldEditorParent() {
> if (style == FLAT) {
> // Create a new parent for each field editor
> Composite parent = new Composite(fieldEditorParent, SWT.NULL);
> parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
> return parent;
> }
> // Just return the parent
> return fieldEditorParent;
> }
>
>
> I don't have any clue what is going wrong as I did copy the example from
> Lars' tutorial. I'm using 3.4. Anyone got a hint for me?
> greetings,
> Dagmar
Previous Topic:command org.eclipse.ui.window.resetPerspective not active
Next Topic:Re: RCP app failing to update in 3.5
Goto Forum:
  


Current Time: Mon Sep 22 00:08:55 GMT 2014

Powered by FUDForum. Page generated in 0.01758 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software