X-Git-Url: http://secure.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.news/src/net/sourceforge/phpeclipse/news/UpdateThread.java b/archive/net.sourceforge.phpeclipse.news/src/net/sourceforge/phpeclipse/news/UpdateThread.java new file mode 100644 index 0000000..8ab8e09 --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.news/src/net/sourceforge/phpeclipse/news/UpdateThread.java @@ -0,0 +1,36 @@ +package net.sourceforge.phpeclipse.news; + +import java.util.Iterator; + +public class UpdateThread extends Thread { + + + /** + * Constructor for UpdateThread + */ + public UpdateThread() { + super(); + this.setDaemon(true); + } + + /** + * @see Runnable#run() + */ + public void run() { + try { + Plugin plugin = Plugin.getDefault(); + Iterator iterator = Plugin.getDefault().getChannelList().iterator(); + while(iterator.hasNext()) { + Channel channel = (Channel)iterator.next(); + channel.setRefreshing(true); + plugin.notifyChannelStatusChanged(channel, null); + channel.update(); + channel.setRefreshing(false); + plugin.notifyChannelStatusChanged(channel, null); + } + } finally { + Plugin.getDefault().updateThread = null; + } + } + +} \ No newline at end of file