use of org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoader method traceClosed.
/**
* Signal handler for the trace closed signal.
*
* @param signal
* The trace closed signal
*/
@TmfSignalHandler
public void traceClosed(TmfTraceClosedSignal signal) {
if (signal.getTrace() != fTrace) {
return;
}
ITmfEventRequest indexRequest = null;
fLock.lock();
try {
indexRequest = fIndexRequest;
fIndexRequest = null;
cancelOngoingRequests();
if (fFilterCriteria != null) {
fFilterCriteria.clear();
}
FilterListDialog.deactivateSavedGlobalFilters();
} finally {
fTrace = null;
fLock.unlock();
}
if (indexRequest != null && !indexRequest.isCompleted()) {
indexRequest.cancel();
}
resetLoader();
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler in project tracecompass by tracecompass.
the class AbstractSegmentStoreTableViewer method traceClosed.
/**
* Trace closed handler
*
* @param signal
* Last opened trace was closed
*/
@TmfSignalHandler
public void traceClosed(TmfTraceClosedSignal signal) {
ITmfTrace trace = fTrace;
if (trace == signal.getTrace()) {
// Cancel the filtering job
Job job = fFilteringJob;
if (job != null) {
job.cancel();
}
}
// Check if there is no more opened trace
if (TmfTraceManager.getInstance().getActiveTrace() == null) {
if (!getTableViewer().getTable().isDisposed()) {
getTableViewer().setInput(null);
getTableViewer().setItemCount(0);
refresh();
}
ISegmentStoreProvider provider = getSegmentProvider();
if ((provider != null)) {
SegmentStoreProviderProgressListener listener = fListener;
if (listener != null) {
provider.removeListener(listener);
}
}
fTrace = null;
}
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler in project tracecompass by tracecompass.
the class AbstractSegmentStoreTableViewer method traceSelected.
// ------------------------------------------------------------------------
// Signal handlers
// ------------------------------------------------------------------------
/**
* Trace selected handler
*
* @param signal
* Different opened trace (on which segment store analysis as
* already been performed) has been selected
*/
@TmfSignalHandler
public void traceSelected(TmfTraceSelectedSignal signal) {
ITmfTrace trace = signal.getTrace();
if (trace != fTrace) {
// Cancel the filtering job from the previous trace
Job job = fFilteringJob;
if (job != null) {
job.cancel();
}
}
fTrace = trace;
if (trace != null) {
setData(getSegmentStoreProvider(trace));
}
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler in project tracecompass by tracecompass.
the class AbstractSegmentStoreScatterChartViewer2 method traceOpened.
/**
* @param signal
* Signal received when trace is opened
*/
@Override
@TmfSignalHandler
public void traceOpened(@Nullable TmfTraceOpenedSignal signal) {
super.traceOpened(signal);
if (getTrace() != null) {
final TmfTimeRange timeRange = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange();
setWindowRange(timeRange.getStartTime().toNanos(), timeRange.getEndTime().toNanos());
}
}
use of org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler in project tracecompass by tracecompass.
the class AbstractSegmentStoreScatterChartViewer2 method traceSelected.
// ------------------------------------------------------------------------
// Signal handlers
// ------------------------------------------------------------------------
/**
* @param signal
* Signal received when a different trace is selected
*/
@Override
@TmfSignalHandler
public void traceSelected(@Nullable TmfTraceSelectedSignal signal) {
super.traceSelected(signal);
if (getTrace() != null) {
final TmfTimeRange timeRange = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange();
setWindowRange(timeRange.getStartTime().toNanos(), timeRange.getEndTime().toNanos());
}
}
Aggregations