ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / project / wizards / SelectTracesWizard.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.ui.project.wizards;
14
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;
21
22 /**
23 * Wizard implementation to select traces for an experiment.
24 * <p>
25 * @version 1.0
26 * @author Francois Chouinard
27 */
28 public class SelectTracesWizard extends Wizard implements IImportWizard {
29
30 // ------------------------------------------------------------------------
31 // Attributes
32 // ------------------------------------------------------------------------
33
34 private final TmfProjectElement fProject;
35 private final TmfExperimentElement fExperiment;
36 private SelectTracesWizardPage fSelectTraceWizardPage;
37
38 // ------------------------------------------------------------------------
39 // Constructor
40 // ------------------------------------------------------------------------
41
42 /**
43 * Constructor
44 * @param project The project model element
45 * @param experiment The experiemnt model element
46 */
47 public SelectTracesWizard(TmfProjectElement project, TmfExperimentElement experiment) {
48 fProject = project;
49 fExperiment = experiment;
50 }
51
52 // ------------------------------------------------------------------------
53 // Wizard
54 // ------------------------------------------------------------------------
55
56 @Override
57 public void init(IWorkbench workbench, IStructuredSelection selection) {
58 setWindowTitle(Messages.SelectTracesWizard_WindowTitle);
59 setNeedsProgressMonitor(true);
60 }
61
62 @Override
63 public void addPages() {
64 super.addPages();
65 fSelectTraceWizardPage = new SelectTracesWizardPage(fProject, fExperiment);
66 addPage(fSelectTraceWizardPage);
67 }
68
69 @Override
70 public boolean performFinish() {
71 return fSelectTraceWizardPage.performFinish();
72 }
73
74 }
This page took 0.042068 seconds and 5 git commands to generate.