/******************************************************************************* * Copyright (c) 2010 Martin Schnabel <mb0@mb0.org>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package org.axdt.as3.ui.wizards; import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; import org.eclipse.xtext.ui.wizard.IProjectCreator; import org.eclipse.xtext.ui.wizard.IProjectInfo; import org.eclipse.xtext.ui.wizard.XtextNewProjectWizard; import com.google.inject.Inject; public class NewAs3ProjectWizard extends XtextNewProjectWizard { private WizardNewProjectCreationPage mainPage; @Inject public NewAs3ProjectWizard(IProjectCreator projectCreator) { super(projectCreator); setWindowTitle("New As3 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("As3 Project"); mainPage.setDescription("Create a new As3 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.axdt.as3.ui.wizards.As3ProjectInfo projectInfo = new org.axdt.as3.ui.wizards.As3ProjectInfo(); projectInfo.setProjectName(mainPage.getProjectName()); return projectInfo; } }