1 /*******************************************************************************
2 * Copyright (c) 2010, 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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.tmf
.ui
.parsers
.wizards
;
15 import org
.eclipse
.jface
.viewers
.ISelection
;
16 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
17 import org
.eclipse
.jface
.wizard
.Wizard
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.parsers
.custom
.CustomXmlTraceDefinition
;
19 import org
.eclipse
.ui
.INewWizard
;
20 import org
.eclipse
.ui
.IWorkbench
;
23 * Wizard for custom XML trace parsers.
25 * @author Patrick Tasse
27 public class CustomXmlParserWizard
extends Wizard
implements INewWizard
{
29 CustomXmlParserInputWizardPage inputPage
;
30 CustomXmlParserOutputWizardPage outputPage
;
31 private ISelection selection
;
32 CustomXmlTraceDefinition definition
;
37 public CustomXmlParserWizard() {
45 * The trace definition
47 public CustomXmlParserWizard(CustomXmlTraceDefinition definition
) {
49 this.definition
= definition
;
53 public boolean performFinish() {
54 CustomXmlTraceDefinition def
= outputPage
.getDefinition();
55 if (definition
!= null && !definition
.definitionName
.equals(def
.definitionName
)) {
56 CustomXmlTraceDefinition
.delete(definition
.definitionName
);
63 * Adding the page to the wizard.
67 public void addPages() {
68 inputPage
= new CustomXmlParserInputWizardPage(selection
, definition
);
70 outputPage
= new CustomXmlParserOutputWizardPage(this);
75 public void init(IWorkbench workbench
, IStructuredSelection sel
) {