/** SpagoBI, the Open Source Business Intelligence suite Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. **/ package it.eng.spagobi.studio.core.importWizards; import org.eclipse.core.resources.IFile; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.IImportWizard; import org.eclipse.ui.IWorkbench; public class ImportWizard extends Wizard implements IImportWizard { ImportWizardPage mainPage; public ImportWizard() { super(); } /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#performFinish() */ public boolean performFinish() { IFile file = mainPage.createNewFile(); if (file == null) return false; return true; } /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection) */ public void init(IWorkbench workbench, IStructuredSelection selection) { setWindowTitle("File Import Wizard"); //NON-NLS-1 setNeedsProgressMonitor(true); mainPage = new ImportWizardPage("Import File",selection); //NON-NLS-1 } /* (non-Javadoc) * @see org.eclipse.jface.wizard.IWizard#addPages() */ public void addPages() { super.addPages(); addPage(mainPage); } }