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

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/internal/lttng/ui/views/controlflow/model/FlowTimeRangeViewerProvider.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
 *   Matthew Khouzam - Initial implementation
 
11
 *******************************************************************************/
 
12
 
 
13
package org.eclipse.linuxtools.internal.lttng.ui.views.controlflow.model;
 
14
 
 
15
import org.eclipse.linuxtools.internal.lttng.ui.model.trange.TimeRangeViewerProvider;
 
16
import org.eclipse.linuxtools.internal.lttng.ui.views.common.ParamsUpdater;
 
17
 
 
18
public class FlowTimeRangeViewerProvider extends TimeRangeViewerProvider {
 
19
 
 
20
        public FlowTimeRangeViewerProvider(ParamsUpdater paramsUpdater) {
 
21
                super(paramsUpdater);
 
22
        }
 
23
 
 
24
        /*
 
25
         * (non-Javadoc)
 
26
         * 
 
27
         * @see
 
28
         * org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.TmfTimeAnalysisProvider
 
29
         * #getStateName(org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.
 
30
         * TmfTimeAnalysisProvider.StateColor)
 
31
         */
 
32
        @Override
 
33
        public String getStateName(StateColor color) {
 
34
                // Override to multiple instances of the widget, the same color can have
 
35
                // multiple meanings
 
36
                boolean isInProcess = procStateToColor.containsValue(color);
 
37
                
 
38
                if (isInProcess) {
 
39
                        return findObject(color, procStateToColor);
 
40
                }
 
41
                return super.getStateName(color);
 
42
        }
 
43
 
 
44
        
 
45
 
 
46
}