blob: 8d1b9293943346b8fbbcffa7e305334e1769d92e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*******************************************************************************
* Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Uwe Stieber (Wind River) - initial API and implementation
*******************************************************************************/
package org.eclipse.tm.te.tcf.log.core.internal;
import org.eclipse.tm.tcf.protocol.Protocol;
/**
* Class loaded by the TCF core framework when the framework is fired up. The static
* constructor of the class will trigger the registration of the listeners in order
* to log the communication from the point the framework started up.
* <p>
* <b>Note:</b> This will effectively trigger {@link CoreBundleActivator#start(org.osgi.framework.BundleContext)}
* to be called.
*/
public class Startup {
static {
// We might get here on shutdown as well, and if TCF has not
// been loaded, than we will run into an NPE. Lets double check.
if (Protocol.getEventQueue() != null) {
// Execute the listener registration within the TCF dispatch thread
Protocol.invokeLater(new Runnable() {
public void run() {
LogManager.getInstance().initListeners();
}
});
}
}
}
|