blob: 2009bd6762531b74bc3c7ab935b5d9c96917e6f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*******************************************************************************
* Copyright (c) 2014 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.internal.systemtap.ui.ide.structures;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
/**
* A base abstract class to be used for extensions of {@link TapsetParser}
* that construct a displayable {@link TreeNode}.
*/
public abstract class TreeTapsetParser extends TapsetParser {
protected TreeTapsetParser(String jobTitle) {
super(jobTitle);
}
/**
* Prepares the parser for a run. Clients must override this method to perform
* actions during the run; a call to super.run() is necessary.
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
resetTree();
return null;
}
/**
* @return The tree that this parser constructs.
*/
abstract TreeNode getTree();
/**
* Clears & resets the tree that this parser constructs.
*/
abstract protected void resetTree();
/**
* Clean up everything from the last parse run.
*/
abstract void dispose();
}
|