/*******************************************************************************
- * Copyright (c) 2009, 2010 Ericsson
+ * Copyright (c) 2009, 2012 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import java.util.Map;
import org.eclipse.linuxtools.internal.tmf.core.Activator;
-import org.eclipse.linuxtools.internal.tmf.core.Tracer;
+import org.eclipse.linuxtools.internal.tmf.core.TmfCoreTracer;
/**
* This class manages the set of signal listeners and the signals they are
static private void sendSignal(Map<Object, Method[]> listeners, TmfSignal signal) {
- if (Tracer.isSignalTraced()) {
- Tracer.traceSignal(signal, "(start)"); //$NON-NLS-1$
+ if (TmfCoreTracer.isSignalTraced()) {
+ TmfCoreTracer.traceSignal(signal, "(start)"); //$NON-NLS-1$
}
// Build the list of listener methods that are registered for this signal
for (Method method : entry.getValue()) {
try {
method.invoke(entry.getKey(), new Object[] { signal });
- if (Tracer.isSignalTraced()) {
+ if (TmfCoreTracer.isSignalTraced()) {
Object key = entry.getKey();
String hash = String.format("%1$08X", entry.getKey().hashCode()); //$NON-NLS-1$
String target = "[" + hash + "] " + key.getClass().getSimpleName() + ":" + method.getName(); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- Tracer.traceSignal(signal, target);
+ TmfCoreTracer.traceSignal(signal, target);
}
} catch (IllegalArgumentException e) {
- Activator.getDefault().logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
} catch (IllegalAccessException e) {
- Activator.getDefault().logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
} catch (InvocationTargetException e) {
- Activator.getDefault().logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.logError("Exception handling signal " + signal + " in method " + method, e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
- if (Tracer.isSignalTraced()) {
- Tracer.traceSignal(signal, "(end)"); //$NON-NLS-1$
+ if (TmfCoreTracer.isSignalTraced()) {
+ TmfCoreTracer.traceSignal(signal, "(end)"); //$NON-NLS-1$
}
}