1 11 package org.eclipse.ui.internal.ide.dialogs; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.jface.resource.ImageDescriptor; 15 import org.eclipse.jface.viewers.IStructuredSelection; 16 import org.eclipse.jface.wizard.Wizard; 17 import org.eclipse.ui.IWorkbench; 18 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; 19 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; 20 21 public class ProjectCapabilitySimpleAddWizard extends Wizard { 22 private ProjectCapabilitySimpleSelectionPage mainPage; 23 24 private IWorkbench workbench; 25 26 private IStructuredSelection selection; 27 28 private IProject project; 29 30 public ProjectCapabilitySimpleAddWizard(IWorkbench workbench, 31 IStructuredSelection selection, IProject project) { 32 super(); 33 this.workbench = workbench; 34 this.selection = selection; 35 this.project = project; 36 setForcePreviousAndNextButtons(true); 37 setNeedsProgressMonitor(true); 38 initializeDefaultPageImageDescriptor(); 39 setWindowTitle(IDEWorkbenchMessages.ProjectCapabilitySimpleSelectionPage_windowTitle); 40 } 41 42 45 public void addPages() { 46 mainPage = new ProjectCapabilitySimpleSelectionPage( 47 "projectCapabilitySimpleSelectionPage", workbench, selection, project); 49 mainPage.setTitle(IDEWorkbenchMessages.ProjectCapabilitySimpleSelectionPage_title); 50 mainPage.setDescription(IDEWorkbenchMessages.ProjectCapabilitySimpleSelectionPage_description); 51 addPage(mainPage); 52 } 53 54 57 public boolean canFinish() { 58 return false; 59 } 60 61 64 protected void initializeDefaultPageImageDescriptor() { 65 ImageDescriptor desc = IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/newprj_wiz.gif"); setDefaultPageImageDescriptor(desc); 67 } 68 69 72 public boolean performFinish() { 73 return true; 74 } 75 } 76 | Popular Tags |