blob: bf3d3243e9324938eda975150a4d89c767615ac3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2016 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.dltk.python.internal.ui.wizards;
import org.eclipse.dltk.python.core.PythonNature;
import org.eclipse.dltk.python.internal.ui.PythonImages;
import org.eclipse.dltk.python.internal.ui.preferences.PythonBuildPathsBlock;
import org.eclipse.dltk.ui.DLTKUIPlugin;
import org.eclipse.dltk.ui.util.BusyIndicatorRunnableContext;
import org.eclipse.dltk.ui.util.IStatusChangeListener;
import org.eclipse.dltk.ui.wizards.BuildpathsBlock;
import org.eclipse.dltk.ui.wizards.ProjectWizard;
import org.eclipse.dltk.ui.wizards.ProjectWizardFirstPage;
import org.eclipse.dltk.ui.wizards.ProjectWizardSecondPage;
public class PythonProjectCreationWizard extends ProjectWizard {
private ProjectWizardFirstPage fFirstPage;
private ProjectWizardSecondPage fSecondPage;
public PythonProjectCreationWizard() {
setDefaultPageImageDescriptor(PythonImages.DESC_WIZBAN_PROJECT_CREATION);
setDialogSettings(DLTKUIPlugin.getDefault().getDialogSettings());
setWindowTitle(PythonWizardMessages.ProjectCreationWizard_title);
}
@Override
public String getScriptNature() {
return PythonNature.NATURE_ID;
}
@Override
public void addPages() {
super.addPages();
fFirstPage = new ProjectWizardFirstPage() {
@Override
protected boolean interpeterRequired() {
// TODO Auto-generated method stub
return false;
}
};
fFirstPage
.setTitle(PythonWizardMessages.ProjectCreationWizardFirstPage_title);
fFirstPage
.setDescription(PythonWizardMessages.ProjectCreationWizardFirstPage_description);
addPage(fFirstPage);
fSecondPage = new ProjectWizardSecondPage(fFirstPage) {
@Override
protected BuildpathsBlock createBuildpathBlock(
IStatusChangeListener listener) {
return new PythonBuildPathsBlock(
new BusyIndicatorRunnableContext(), listener, 0,
useNewSourcePage(), null);
}
};
addPage(fSecondPage);
}
}