private ImageLoader mLoader;
// The shared instance
private static FreshConnectionActivator plugin;
-
+
+ DeviceChecker deviceChecker;
+
/**
* The constructor
*/
this.OS = this.LINUX;
mLoader = new ImageLoader(this);
- new DeviceChecker().start();
+ deviceChecker = new DeviceChecker();
+ deviceChecker.start();
UIJob job = new UIJob("Connect LocalMachine...") {
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
+ if (deviceChecker != null)
+ deviceChecker.stop();
plugin = null;
super.stop(context);
}
String INTERFACE_NAME = null;
+ public DeviceChecker() {
+ setName("DeviceChecker");
+ setDaemon(true); // Marks this thread as either a daemon thread or a user thread. The Java Virtual Machine exits when the only threads running are all daemon threads.
+ }
+
public void run() {
UIJob job = null;
while (this.isActive) {