1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 Ericsson
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
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.tmf
.ui
.project
.wizards
.tracepkg
.importexport
;
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
;
23 * Wizard for importing a trace package
25 * @author Marc-Andre Laperle
27 public class ImportTracePackageWizard
extends Wizard
implements IImportWizard
{
29 private static final String STORE_IMPORT_TRACE_PKG_WIZARD
= "ImportTracePackageWizard"; //$NON-NLS-1$
30 private IStructuredSelection fSelection
;
31 private ImportTracePackageWizardPage fPage
;
34 * Constructs the import trace package wizard
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
);
43 setDialogSettings(section
);
47 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
48 fSelection
= selection
;
49 setNeedsProgressMonitor(true);
53 public boolean performFinish() {
54 return fPage
.finish();
58 public void addPages() {
60 fPage
= new ImportTracePackageWizardPage(fSelection
);