1 package org.simantics.sysdyn.ui.wizards.models;
\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
11 public class ExportWizardModel extends Wizard implements IImportWizard {
\r
13 private WizardModelsExportPage mainPage;
\r
14 private IStructuredSelection currentSelection = null;
\r
15 private String initialPath = null;
\r
16 public Resource selection;
\r
19 * Constructor for ExternalProjectImportWizard.
\r
21 public ExportWizardModel() {
\r
26 * Constructor for ExternalProjectImportWizard.
\r
28 public ExportWizardModel(String initialPath)
\r
31 this.initialPath = initialPath;
\r
34 public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
\r
35 setWindowTitle("Export");
\r
36 this.currentSelection = currentSelection;
\r
37 selection = (Resource)AdaptionUtils.adaptToSingle(currentSelection, org.simantics.db.Resource.class);
\r
40 public void addPages() {
\r
42 mainPage = new WizardModelsExportPage(
\r
43 "wizardModelsExportPage", initialPath, currentSelection); //$NON-NLS-1$
\r
48 public boolean performFinish() {
\r
49 return mainPage.createProjects();
\r