Strange Behavior when adding a FormPage into SharedHeaderFormEditor [message #328055] |
Tue, 13 May 2008 08:39  |
Eclipse User |
|
|
|
Hello,
Im using a SharedHeaderFormEditor and want to add a FormPage into the
editors 'body'
In SharedHeaderFormEditor addPages function I'm doing the following:
@Override
protected void addPages() {
try {
myFormPage = new MyFormPage(this, MyFormPage.ID, "MyFormPage");
addPage(0, myFormPage);
} catch (PartInitException e) {
e.printStackTrace();
}
}
As result I'm getting an exception refer to FormEditor line 490:
java.lang.NullPointerException
at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor .java:490)
at
org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEdi tor.java:623)
...
When debugging into this I find the following line:
fpage.getPartControl().setMenu(getContainer().getMenu());
In my case getContainer().getMenu() returns null. (why ever...). This
seems to cause the exception.
Is this a bug, or is there something obviously wrong with my code?
Thanks,
Jan
|
|
|
|
Powered by
FUDForum. Page generated in 0.06631 seconds