Source:
<code>public boolean performFinish() { boolean result = false; <START> if (mainPage.isPageComplete()) { <END> final File rootImportPath = mainPage.getSelectedFolder(); final WorkspaceModifyOperation op = new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws CoreException { try { importProjects(rootImportPath, monitor); } catch (Exception e) { throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, "Error during import of Bnd workspace!", e)); } } }; Job importJob = new Job("Import Bnd Workspace") { @Override protected IStatus run(IProgressMonitor monitor) { try { op.run(monitor); } catch (InvocationTargetException e) { Throwable t = e.getCause(); if (t instanceof CoreException && ((CoreException) t).getStatus().getException() != null) { t = ((CoreException) t).getStatus().getException(); } return new Status(Status.ERROR, Plugin.PLUGIN_ID, "Could not finish import job for Bnd Workspace!", t); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } return Status.OK_STATUS; } }; importJob.schedule(); try { IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IPerspectiveDescriptor currentPerspective = window.getActivePage().getPerspective(); if (!"bndtools.perspective".equals(currentPerspective.getId())) { if (MessageDialog.openQuestion(getShell(), "Bndtools Perspective", "Switch to the Bndtools perspective?")) { this.workbench.showPerspective("bndtools.perspective", window); } } } catch (WorkbenchException e) { error("Unable to switch to BndTools perspective", e); } result = true; } return result; }</code><technical_language>Do need check this? I performFinish get called pages complete</technical_language>

Target:
public boolean performFinish() { final ImportSettings importSettings = new ImportSettings(mainPage.getSelectedFolder(), mainPage.isDeleteSettings(), mainPage.isInferExecutionEnvironment()); final WorkspaceModifyOperation op = new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws CoreException { try { importProjects(importSettings, monitor); } catch (Exception e) { throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, "Error during import of Bnd workspace!", e)); } } }; Job importJob = new Job("Import Bnd Workspace") { @Override protected IStatus run(IProgressMonitor monitor) { try { op.run(monitor); } catch (InvocationTargetException e) { Throwable t = e.getCause(); if (t instanceof CoreException && ((CoreException) t).getStatus().getException() != null) { t = ((CoreException) t).getStatus().getException(); } return new Status(Status.ERROR, Plugin.PLUGIN_ID, "Could not finish import job for Bnd Workspace!", t); } catch (InterruptedException e) { return Status.CANCEL_STATUS; } return Status.OK_STATUS; } }; importJob.schedule(); try { IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); IPerspectiveDescriptor currentPerspective = window.getActivePage().getPerspective(); if (!"bndtools.perspective".equals(currentPerspective.getId())) { if (MessageDialog.openQuestion(getShell(), "Bndtools Perspective", "Switch to the Bndtools perspective?")) { this.workbench.showPerspective("bndtools.perspective", window); } } } catch (WorkbenchException e) { error("Unable to switch to BndTools perspective", e); } return true; }