blob: 448dc9225b7131b316aa244b91be8a8f6d89222c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 ALL4TEC & CEA LIST.
* 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
*
* Contributors:
* ALL4TEC & CEA LIST - initial API and implementation
******************************************************************************/
package org.polarsys.esf.core.wizard.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
import org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard;
import org.eclipse.ui.IWorkbench;
import org.polarsys.esf.core.wizard.ui.WizardUIActivator;
import org.polarsys.esf.core.wizard.ui.WizardUIActivator.Implementation;
import org.polarsys.esf.core.wizard.ui.commands.ESFModelCreationCommand;
/**
* Wizard dedicated to create a ESF project.
*
* @author $Author: ymunoz $
* @version $Revision: 168 $
*/
public class CreateESFProjectWizard
extends NewPapyrusProjectWizard {
/** Window title. */
public static final String WINDOW_TITLE =
WizardUIActivator.getMessages().getString("CreateESFProjectWizard.title"); //$NON-NLS-1$
/** Project title used for creation of a new ESF Project. */
public static final String PROJECT_PAGE_TITLE =
WizardUIActivator.getMessages().getString("CreateESFProjectWizard.projectpage.title"); //$NON-NLS-1$
/** Project description for creation of a new ESF Project. */
public static final String PROJECT_PAGE_DESCRIPTION =
WizardUIActivator.getMessages().getString("CreateESFProjectWizard.projectpage.description"); //$NON-NLS-1$
/**
* Default constructor.
*/
public CreateESFProjectWizard() {
super();
}
/**
* {@inheritDoc}
*/
@Override
public void init(final IWorkbench pWorkbench, final IStructuredSelection pSelection) {
// Call the parent method for general initialisation
super.init(pWorkbench, pSelection);
// Set the window title
setWindowTitle(WINDOW_TITLE);
// Override the page creation title and description
// NB: Until the refactor of the method createNewProjectCreationPage, this must be done here
getMyProjectPage().setTitle(PROJECT_PAGE_TITLE);
getMyProjectPage().setDescription(PROJECT_PAGE_DESCRIPTION);
// Set the default page image
setDefaultPageImageDescriptor(WizardUIActivator.getPlugin().getImageRegistry()
.getDescriptor(Implementation.ICON_WIZARD_PROJECT));
}
/**
* {@inheritDoc}
*/
@Override
protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
return null;
}
/**
* {@inheritDoc}
*/
@Override
protected void saveDiagramCategorySettings() {
}
/**
* {@inheritDoc}
*/
@Override
protected String[] getDiagramCategoryIds() {
return new String[] {ESFModelCreationCommand.DIAGRAMCATEGORY_ID};
}
}