1 /*******************************************************************************
2 * Copyright (c) 2016 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
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.ui
.actions
;
12 import org
.eclipse
.jdt
.annotation
.NonNull
;
13 import org
.eclipse
.jface
.action
.Action
;
14 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.signals
.TmfCpuSelectedSignal
;
15 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
16 import org
.eclipse
.tracecompass
.tmf
.ui
.views
.TmfView
;
19 * CPU Selection Action
21 * @author Matthew Khouzam
23 public class FollowCpuAction
extends Action
{
25 private final @NonNull TmfView fView
;
26 private final int fCpu
;
27 private final @NonNull ITmfTrace fTrace
;
33 * the view to send a signal
39 public FollowCpuAction(@NonNull TmfView view
, int cpu
, @NonNull ITmfTrace trace
) {
46 public String
getText() {
47 return Messages
.CpuSelectionAction_followCpu
+ ' ' + fCpu
;
52 fView
.broadcast(new TmfCpuSelectedSignal(fView
, fCpu
, fTrace
));