package org.panlab.officedl.ui.wizard;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.xtext.ui.wizard.IProjectInfo;
import org.eclipse.xtext.ui.wizard.XtextNewProjectWizard;
import org.eclipse.xtext.ui.wizard.IProjectCreator;
import com.google.inject.Inject;
public class OfficeDLNewProjectWizard extends XtextNewProjectWizard {
private WizardNewProjectCreationPage mainPage;
@Inject
public OfficeDLNewProjectWizard(IProjectCreator projectCreator) {
super(projectCreator);
setWindowTitle("New OfficeDL Project");
}
/**
* Use this method to add pages to the wizard.
* The one-time generated version of this class will add a default new project page to the wizard.
*/
public void addPages() {
mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");
mainPage.setTitle("OfficeDL Project");
mainPage.setDescription("Create a new OfficeDL project.");
addPage(mainPage);
}
/**
* Use this method to read the project settings from the wizard pages and feed them into the project info class.
*/
@Override
protected IProjectInfo getProjectInfo() {
org.panlab.officedl.ui.wizard.OfficeDLProjectInfo projectInfo = new org.panlab.officedl.ui.wizard.OfficeDLProjectInfo();
projectInfo.setProjectName(mainPage.getProjectName());
return projectInfo;
}
}