/*******************************************************************************
- * Copyright (c) 2013 Ericsson
+ * Copyright (c) 2013, 2014 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.linuxtools.tmf.core.trace;
+import org.eclipse.core.resources.IFile;
import org.eclipse.linuxtools.tmf.core.filter.ITmfFilter;
import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
final class TmfTraceContext {
static final TmfTraceContext NULL_CONTEXT =
- new TmfTraceContext(TmfTimestamp.BIG_CRUNCH, TmfTimestamp.BIG_CRUNCH, TmfTimeRange.NULL_RANGE);
+ new TmfTraceContext(TmfTimestamp.BIG_CRUNCH, TmfTimestamp.BIG_CRUNCH, TmfTimeRange.NULL_RANGE, null);
private final TmfTimeRange fSelection;
private final TmfTimeRange fWindowRange;
+ private final IFile fEditorFile;
private final ITmfFilter fFilter;
- public TmfTraceContext(ITmfTimestamp beginTs, ITmfTimestamp endTs, TmfTimeRange tr) {
+ public TmfTraceContext(ITmfTimestamp beginTs, ITmfTimestamp endTs, TmfTimeRange tr, IFile editorFile) {
fSelection = new TmfTimeRange(beginTs, endTs);
fWindowRange = tr;
+ fEditorFile = editorFile;
fFilter = null;
}
public TmfTraceContext(TmfTraceContext prevCtx, ITmfTimestamp beginTs, ITmfTimestamp endTs) {
fSelection = new TmfTimeRange(beginTs, endTs);
fWindowRange = prevCtx.fWindowRange;
+ fEditorFile = prevCtx.fEditorFile;
fFilter = prevCtx.fFilter;
}
public TmfTraceContext(TmfTraceContext prevCtx, TmfTimeRange tr) {
fSelection = prevCtx.fSelection;
fWindowRange = tr;
+ fEditorFile = prevCtx.fEditorFile;
fFilter = prevCtx.fFilter;
}
public TmfTraceContext(TmfTraceContext prevCtx, ITmfFilter filter) {
fSelection = prevCtx.fSelection;
fWindowRange = prevCtx.fWindowRange;
+ fEditorFile = prevCtx.fEditorFile;
fFilter = filter;
}
return fWindowRange;
}
+ public IFile getEditorFile() {
+ return fEditorFile;
+ }
+
/**
* @return the current filter applied to the trace
* @since 2.2