~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEditor.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2010 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
 *   Patrick Tasse - Initial API and implementation
 
11
 *******************************************************************************/
 
12
 
 
13
package org.eclipse.linuxtools.tmf.ui.editors;
 
14
 
 
15
import org.eclipse.linuxtools.tmf.core.component.ITmfComponent;
 
16
import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 
17
import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 
18
import org.eclipse.ui.part.EditorPart;
 
19
 
 
20
/**
 
21
 * The main editor abstract class for use in TMF.
 
22
 *
 
23
 * @version 1.0
 
24
 * @author Patrick Tasse
 
25
 */
 
26
public abstract class TmfEditor extends EditorPart implements ITmfComponent {
 
27
 
 
28
    private final String fName;
 
29
 
 
30
    // ------------------------------------------------------------------------
 
31
    // Constructor
 
32
    // ------------------------------------------------------------------------
 
33
 
 
34
    /**
 
35
     * Default constructor
 
36
     */
 
37
    public TmfEditor() {
 
38
        super();
 
39
        fName = "TmfEditor"; //$NON-NLS-1$
 
40
        TmfSignalManager.register(this);
 
41
    }
 
42
 
 
43
    @Override
 
44
    public void dispose() {
 
45
        TmfSignalManager.deregister(this);
 
46
        super.dispose();
 
47
    }
 
48
 
 
49
    // ------------------------------------------------------------------------
 
50
    // ITmfComponent
 
51
    // ------------------------------------------------------------------------
 
52
 
 
53
    @Override
 
54
        public String getName() {
 
55
        return fName;
 
56
    }
 
57
 
 
58
    @Override
 
59
        public void broadcast(TmfSignal signal) {
 
60
        TmfSignalManager.dispatchSignal(signal);
 
61
    }
 
62
}