Eclipse's wizard is composed of a series of wizardpages. By default, wizarddialog will call the createcontrol () method of each wizardpage during initialization to layout these wizardpages. This is to facilitate the determination of the size of the wizarddialog window. However, if a control in a wizardpage needs to be dynamically generated, for example, you need to input an integer N in page1 and generate n text boxes based on this integer in page2, since the createcontrol () of page2 is only called once, and is called by wizarddialog before obtaining N, the centralized layout method makes it difficult to generate the page2 interface.
Compared with the problem description, the solution is much simpler, as long as the createpagecontrols () method of wizard is overwritten so that it can do nothing:
@ OverridePublic VoidCreatepagecontrols (composite pagecontainer ){//Super. createpagecontrols (pagecontainer );}
Theoretically, the problem with this operation is that the size of the wizarddialog may not be able to accommodate all the controls, but I haven't encountered it in actual applications, as long as there are not too many dynamically generated controls, or you can use the scroll mode to accommodate it.
Reference: http://dev.eclipse.org/newslists/news.eclipse.tools/msg02641.html