* Contributors:
* Florian Wininger - Initial API and implementation
* Alexandre Montplaisir - Refactoring, performance tweaks
+ * Bernd Hufmann - Updated signal handling
*******************************************************************************/
package org.eclipse.linuxtools.tmf.ui.views.statesystem;
import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
// ------------------------------------------------------------------------
// Signal handlers
// ------------------------------------------------------------------------
+ /**
+ * Handler for the trace opened signal.
+ * @param signal
+ * The incoming signal
+ * @since 2.0
+ */
+ @TmfSignalHandler
+ public void traceOpened(TmfTraceOpenedSignal signal) {
+ fTrace = signal.getTrace();
+ loadTrace();
+ }
/**
* Handler for the trace selected signal. This will make the view display
ITmfTrace trace = signal.getTrace();
if (trace != fTrace) {
fTrace = trace;
- Thread thread = new Thread("State system visualizer construction") { //$NON-NLS-1$
- @Override
- public void run() {
- createTable();
- }
- };
- thread.start();
+ loadTrace();
}
}
};
thread.start();
}
+
+ private void loadTrace() {
+ Thread thread = new Thread("State system visualizer construction") { //$NON-NLS-1$
+ @Override
+ public void run() {
+ createTable();
+ }
+ };
+ thread.start();
+ }
+
}