1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.project
.wizards
;
15 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
16 import org
.eclipse
.jface
.wizard
.Wizard
;
17 import org
.eclipse
.linuxtools
.tmf
.ui
.project
.model
.TmfExperimentElement
;
18 import org
.eclipse
.linuxtools
.tmf
.ui
.project
.model
.TmfProjectElement
;
19 import org
.eclipse
.ui
.IImportWizard
;
20 import org
.eclipse
.ui
.IWorkbench
;
23 * Wizard implementation to select traces for an experiment.
26 * @author Francois Chouinard
28 public class SelectTracesWizard
extends Wizard
implements IImportWizard
{
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
34 private final TmfProjectElement fProject
;
35 private final TmfExperimentElement fExperiment
;
36 private SelectTracesWizardPage fSelectTraceWizardPage
;
38 // ------------------------------------------------------------------------
40 // ------------------------------------------------------------------------
43 * @param project The project model element
44 * @param experiment The experiemnt model element
46 public SelectTracesWizard(TmfProjectElement project
, TmfExperimentElement experiment
) {
48 fExperiment
= experiment
;
51 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
57 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
60 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
61 setWindowTitle(Messages
.SelectTracesWizard_WindowTitle
);
66 * @see org.eclipse.jface.wizard.Wizard#addPages()
69 public void addPages() {
71 fSelectTraceWizardPage
= new SelectTracesWizardPage(fProject
, fExperiment
);
72 addPage(fSelectTraceWizardPage
);
77 * @see org.eclipse.jface.wizard.Wizard#performFinish()
80 public boolean performFinish() {
81 return fSelectTraceWizardPage
.performFinish();