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

Bug 341908

Summary: [Eclipse Platform Extensions] AbstractWizardPage#doCreateControl(Composite) should return the created control
Product: [Automotive] Sphinx Reporter: Ali AKAR <ali.akar82>
Component: CoreAssignee: Idrissa Dieng <idydieng>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: idydieng, stephaneberle9, yannick7777
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ali AKAR CLA 2011-04-05 09:50:08 EDT
The abstract method AbstractWizardPage#doCreateControl(Composite) is called from the final method AbstractWizardPage#createControl(Composite). 

Actual implementation assume that the developer should call org.eclipse.jface.dialogs.DialogPage#setControl(Control) after creating the control in the  AbstractWizardPage#doCreateControl(Composite), and if u don't do that an exception is raised from org.eclipse.jface.wizard.Wizard#createPageControls(Composite).

It's better that the AbstractWizardPage#doCreateControl(Composite) return the created control then in the final method we call org.eclipse.jface.dialogs.DialogPage#setControl(Control).
Comment 1 Idrissa Dieng CLA 2011-10-07 06:26:40 EDT
(In reply to comment #0)
> The abstract method AbstractWizardPage#doCreateControl(Composite) is called
> from the final method AbstractWizardPage#createControl(Composite). 
> 
> Actual implementation assume that the developer should call
> org.eclipse.jface.dialogs.DialogPage#setControl(Control) after creating the
> control in the  AbstractWizardPage#doCreateControl(Composite), and if u don't
> do that an exception is raised from
> org.eclipse.jface.wizard.Wizard#createPageControls(Composite).
> 
> It's better that the AbstractWizardPage#doCreateControl(Composite) return the
> created control then in the final method we call
> org.eclipse.jface.dialogs.DialogPage#setControl(Control).

Yes that will usefull & it's better because sometime we got mentioned exception. I will realize corresponding changes & update all concrete classes implementation.
Comment 2 Idrissa Dieng CLA 2011-10-07 08:13:35 EDT
Fixed as Ali's proposition.

Modifications done in following classes:

* org.eclipse.sphinx.platform.ui.wizards.pages.AbstractWizardPage
* org.eclipse.sphinx.xtendxpand.ui.wizards.pages.XpandConfigurationPage
* org.eclipse.sphinx.xtendxpand.ui.wizards.pages.CheckConfigurationPage
* org.eclipse.sphinx.xtendxpand.ui.wizards.pages.XtendConfigurationPage
* org.eclipse.sphinx.xtendxpand.ui.wizards.pages.OutletsConfigurationPage
Comment 3 Balazs Grill CLA 2021-07-14 02:14:02 EDT
Mass-closing Resolved tickets