Class TmfTraceContext
java.lang.Object
org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext
- All Implemented Interfaces:
ITraceContextSignalHandler
- Direct Known Subclasses:
LinuxTraceContext
Context of a trace, which is the representation of the "view" the user
currently has on this trace (window time range, selected time or time range).
TODO could be extended to support the notion of current location too.
FIXME Is this really the right place for the Editor File ?
- Since:
- 1.0
- Author:
- Alexandre Montplaisir
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for creating trace context instances. -
Constructor Summary
ConstructorsConstructorDescriptionTmfTraceContext(TmfTimeRange selection, TmfTimeRange windowRange, @Nullable org.eclipse.core.resources.IFile editorFile, @Nullable ITmfFilter filter) Build a new trace context.TmfTraceContext(TmfTraceContext.Builder builder) Constructs a new trace context with data taken from a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder that is initialized with the data from this trace context.getData()Get a copy of the data map@Nullable ObjectGet the data for the specific key@Nullable org.eclipse.core.resources.IFileGet the editor's file@Nullable ITmfFilterGets the filter applied to the current traceintReturn the instance number of this trace.Return the time range representing the current active selection.Return the current window time range.booleanGets whether the trace is time synchronized in selection and window range with other traces.toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.tracecompass.tmf.core.trace.ITraceContextSignalHandler
receive
-
Constructor Details
-
TmfTraceContext
public TmfTraceContext(TmfTimeRange selection, TmfTimeRange windowRange, @Nullable org.eclipse.core.resources.IFile editorFile, @Nullable ITmfFilter filter) Build a new trace context.- Parameters:
selection- The selected time rangewindowRange- The visible window's time rangeeditorFile- The file representing the selected editorfilter- The currently applied filter. 'null' for none.
-
TmfTraceContext
Constructs a new trace context with data taken from a builder.- Parameters:
builder- the builder- Since:
- 2.3
-
-
Method Details
-
getSelectionRange
Return the time range representing the current active selection.- Returns:
- The selected time range
-
getWindowRange
Return the current window time range.- Returns:
- The current window time range
-
isSynchronized
public boolean isSynchronized()Gets whether the trace is time synchronized in selection and window range with other traces.- Returns:
- true if the trace should be time synchronized, false otherwise
- Since:
- 3.2
-
getInstanceNumber
public int getInstanceNumber()Return the instance number of this trace.- Returns:
- The instance number
- Since:
- 3.2
-
getEditorFile
public @Nullable org.eclipse.core.resources.IFile getEditorFile()Get the editor's file- Returns:
- The editor file
-
getFilter
Gets the filter applied to the current trace- Returns:
- The current filter, or
nullif there is none
-
getData
Get the data for the specific key- Parameters:
key- The id of the data- Returns:
- The data or null if the key do not exist
- Since:
- 2.1
-
getData
Get a copy of the data map- Returns:
- The data map copy
- Since:
- 2.1
-
builder
Returns a new builder that is initialized with the data from this trace context.- Returns:
- the builder
- Since:
- 2.3
-
toString
-