tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / internal / tmf / ui / project / wizards / tracepkg / importexport / ImportTracePackageWizard.java
1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 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
13 package org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.importexport;
14
15 import org.eclipse.jface.dialogs.IDialogSettings;
16 import org.eclipse.jface.viewers.IStructuredSelection;
17 import org.eclipse.jface.wizard.Wizard;
18 import org.eclipse.tracecompass.internal.tmf.ui.Activator;
19 import org.eclipse.ui.IImportWizard;
20 import org.eclipse.ui.IWorkbench;
21
22 /**
23 * Wizard for importing a trace package
24 *
25 * @author Marc-Andre Laperle
26 */
27 public 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.037527 seconds and 5 git commands to generate.