Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324897

Summary: [Wizards] WizardDialog behavior in 3.6 is not backward compatible to 3.2
Product: [Eclipse Project] Platform Reporter: Kihup Boo <kboo>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED INVALID QA Contact: Prakash Rangaraj <prakash>
Severity: major    
Priority: P3 CC: remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kihup Boo CLA 2010-09-09 15:27:37 EDT
Build Identifier: I20100608-0911

When I call WizardDialog.showPage() method, I have a null argument exception. The same code works without any problems with WizardDialog in Eclipse 3.2.

!ENTRY org.eclipse.osgi 4 0 2010-09-09 15:14:03.971
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
	at org.eclipse.jface.dialogs.PageChangingEvent.<init>(PageChangingEvent.java:57)
	at org.eclipse.jface.wizard.WizardDialog.doPageChanging(WizardDialog.java:906)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1197)
...

Reproducible: Always

Steps to Reproduce:
1. Create a WizardPage and a Wizard.
2. Add the page to the wizard.
3. Override createPageControls(Composite) method of the Wizard, and call wizard.getContainer().showPage(composite).
Comment 1 Kihup Boo CLA 2010-09-09 17:06:06 EDT
Some correction to my report.

Actual call needs to be corrected as:
IWizardContainer.showPage(IWizardPage) and this call ends up in WizardDialog.showPage().
Comment 2 Remy Suen CLA 2010-09-09 17:37:25 EDT
You can probably temporarily workaround the problem by overriding getCurrentPage() to return a non-null value. I suspect this has been broken since 3.3.

Could you please provide some simple code to reproduce the problem?
Comment 3 Kihup Boo CLA 2010-09-10 09:50:34 EDT
Hi,

Thanks for the quick suggested workaround. It works.
I will try to write a test code that reproduces this problem and attach it to this bug when I have a chance.

Thanks again.
Comment 4 Prakash Rangaraj CLA 2010-10-05 02:41:42 EDT
(In reply to comment #3)
> Thanks for the quick suggested workaround. It works.
> I will try to write a test code that reproduces this problem and attach it to
> this bug when I have a chance.

   Please reopen when you have the sample code to reproduce the issue