import org.eclipse.tracecompass.tmf.core.component.ITmfComponent;
import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.ui.editors.ITmfTraceEditor;
-import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.part.ViewPart;
*/
protected PinTmfViewAction fPinAction;
- /**
- * Reference to the trace manager
- */
- protected final TmfTraceManager fTraceManager;
-
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
public TmfView(String viewName) {
super();
fName = viewName;
- fTraceManager = TmfTraceManager.getInstance();
TmfSignalManager.register(this);
}
toolBarManager.add(fPinAction);
}
}
-
- /**
- * Get the currently selected trace, or 'null' if the active editor is not a
- * TMF trace.
- *
- * @return The active trace, or 'null' if not a trace
- */
- public ITmfTrace getActiveTrace() {
- IEditorPart editor = getSite().getPage().getActiveEditor();
- if (editor instanceof ITmfTraceEditor) {
- ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
- return trace;
- }
- return null;
- }
-
}