Bug 110643 [API] NewClassCreationWizard needs to be API
We need a Java class creation wizard that we can a) launch programmatically and b) set and get the new class' name, package fragment, superclass, super interfaces, etc. (i.e., prime it before launch and retrieve values after finish). Unfortunately, in Eclipse 3.1 NewClassCreationWizard is not only internal (i.e., not API) but also does not provide the needed getters/setters. So, our current choices seem to be: a) subclass NewClassCreationWizard anyway and implement the needed getters/setters ourselves; or b) copy & paste the code from NewClassCreationWizard (and its superclass, NewElementWizard) to create our own class creation wizard (and implement the getters/setters we need). Neither of these choices are good. (We currently do the former.) In Eclipse 3.2 we'd like NewClassCreationWizard to be API and for it to support the getters/setters we need (i.e., give access to its "model").
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java
private NewClassWizardPage fPage;
	public NewClassCreationWizard() {
		super();
		setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS);
		setDialogSettings(JavaPlugin.getDefault().getDialogSettings());
		setWindowTitle(NewWizardMessages.NewClassCreationWizard_title); 
	}
	/*
	 * @see Wizard#createPages
	 */	
	public void addPages() {
		super.addPages();
		fPage= new NewClassWizardPage();
		addPage(fPage);
		fPage.init(getSelection());
	}
	
	/*(non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.wizards.NewElementWizard#canRunForked()
	 */
	protected boolean canRunForked() {
		return !fPage.isEnclosingTypeSelected();
	}