1 package org.simantics.sysdyn.ui.wizards.functions;
\r
4 import org.eclipse.jface.viewers.IStructuredSelection;
\r
5 import org.eclipse.jface.wizard.Wizard;
\r
6 import org.eclipse.ui.IImportWizard;
\r
7 import org.eclipse.ui.IWorkbench;
\r
8 import org.simantics.db.Resource;
\r
9 import org.simantics.ui.utils.AdaptionUtils;
\r
12 public class ExportWizardFunction extends Wizard implements IImportWizard {
\r
14 private WizardFunctionsExportPage mainPage;
\r
15 private IStructuredSelection currentSelection = null;
\r
16 private String initialPath = null;
\r
17 public Resource selection;
\r
20 * Constructor for ExternalProjectImportWizard.
\r
22 public ExportWizardFunction() {
\r
27 * Constructor for ExternalProjectImportWizard.
\r
29 public ExportWizardFunction(String initialPath)
\r
32 this.initialPath = initialPath;
\r
35 public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
\r
36 setWindowTitle("Export");
\r
37 this.currentSelection = currentSelection;
\r
38 selection = (Resource)AdaptionUtils.adaptToSingle(currentSelection, org.simantics.db.Resource.class);
\r
41 public void addPages() {
\r
43 mainPage = new WizardFunctionsExportPage(
\r
44 "wizardFunctionsExportPage", initialPath, currentSelection); //$NON-NLS-1$
\r
49 public boolean performFinish() {
\r
50 return mainPage.createProjects(selection);
\r