/** * Implements the interface method by looping through template sections and executing them * sequentially. * * @param project the project * @param model the plug-in model * @param monitor the progress monitor to track the execution progress as part of the overall new * project creation operation * @return <code>true</code> if the wizard completed the operation with success, <code>false * </code> otherwise. */ public boolean performFinish(IProject project, IPluginModelBase model, IProgressMonitor monitor) { try { ITemplateSection[] sections = getTemplateSections(); monitor.beginTask("", sections.length); // $NON-NLS-1$ for (int i = 0; i < sections.length; i++) { sections[i].execute(project, model, new SubProgressMonitor(monitor, 1)); } // No reason to do this any more with the new editors // saveTemplateFile(project, null); } catch (CoreException e) { PDEPlugin.logException(e); return false; } finally { monitor.done(); } return true; }
@Override protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { int numUnits = fWebLocation == null ? 3 : 4; monitor.beginTask(PDEUIMessages.NewSiteWizard_creatingProject, numUnits); CoreUtility.createProject(fProject, fPath, monitor); fProject.open(monitor); CoreUtility.addNatureToProject(fProject, PDE.SITE_NATURE, monitor); monitor.worked(1); if (fWebLocation != null) { CoreUtility.createFolder(fProject.getFolder(fWebLocation)); createXSLFile(); createCSSFile(); createHTMLFile(); monitor.worked(1); } monitor.subTask(PDEUIMessages.NewSiteWizard_creatingManifest); IFile file = createSiteManifest(); monitor.worked(1); openFile(file); monitor.worked(1); }