Move alltests plugin to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / project / wizards / tracepkg / importexport / ImportTracePackageWizard.java
CommitLineData
6e651d8b
MAL
1/*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg.importexport;
14
15import org.eclipse.jface.dialogs.IDialogSettings;
16import org.eclipse.jface.viewers.IStructuredSelection;
17import org.eclipse.jface.wizard.Wizard;
18import org.eclipse.linuxtools.internal.tmf.ui.Activator;
19import org.eclipse.ui.IImportWizard;
20import org.eclipse.ui.IWorkbench;
21
22/**
23 * Wizard for importing a trace package
24 *
25 * @author Marc-Andre Laperle
26 */
27public class ImportTracePackageWizard extends Wizard implements IImportWizard {
28
29 private static final String STORE_IMPORT_TRACE_PKG_WIZARD = "ImportTracePackageWizard"; //$NON-NLS-1$
30 private IStructuredSelection fSelection;
31 private ImportTracePackageWizardPage fPage;
32
33 /**
34 * Constructs the import trace package wizard
35 */
36 public ImportTracePackageWizard() {
37 IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
38 IDialogSettings section = workbenchSettings
39 .getSection(STORE_IMPORT_TRACE_PKG_WIZARD);
40 if (section == null) {
41 section = workbenchSettings.addNewSection(STORE_IMPORT_TRACE_PKG_WIZARD);
42 }
43 setDialogSettings(section);
44 }
45
46 @Override
47 public void init(IWorkbench workbench, IStructuredSelection selection) {
48 fSelection = selection;
49 setNeedsProgressMonitor(true);
50 }
51
52 @Override
53 public boolean performFinish() {
54 return fPage.finish();
55 }
56
57 @Override
58 public void addPages() {
59 super.addPages();
60 fPage = new ImportTracePackageWizardPage(fSelection);
61 addPage(fPage);
62 }
63}
This page took 0.048856 seconds and 5 git commands to generate.