t.printStackTrace();
FrameworkLog log = Activator.getFrameworkLog(); if (log != null) { String message = NLS.bind(Messages.scheduled_app_launch_error, apps[i].getAppPid()); log.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.WARNING, 0, message, 0, t, null)); }
		public void run() {			int lastMin = -1;			while (!shutdown) {				try {					Thread.sleep(30000); // sleeping 30 secs instead of 60 to try to avoid skipping minutes					Calendar cal = Calendar.getInstance();					int minute = cal.get(Calendar.MINUTE);					if (minute == lastMin)						continue;					lastMin = minute;					Hashtable props = new Hashtable();					props.put(ScheduledApplication.YEAR, new Integer(cal.get(Calendar.YEAR)));					props.put(ScheduledApplication.MONTH, new Integer(cal.get(Calendar.MONTH)));					props.put(ScheduledApplication.DAY_OF_MONTH, new Integer(cal.get(Calendar.DAY_OF_MONTH)));					props.put(ScheduledApplication.DAY_OF_WEEK, new Integer(cal.get(Calendar.DAY_OF_WEEK)));					props.put(ScheduledApplication.HOUR_OF_DAY, new Integer(cal.get(Calendar.HOUR_OF_DAY)));					props.put(ScheduledApplication.MINUTE, new Integer(minute));					Event timerEvent = new Event(ScheduledApplication.TIMER_TOPIC, props);					EclipseScheduledApplication[] apps = null;					// poor mans implementation of dispatching events; the spec will not allow us to use event admin to dispatch the virtual timer events; boo!!					synchronized (timerApps) {						if (timerApps.size() == 0)							continue;						apps = (EclipseScheduledApplication[]) timerApps.toArray(new EclipseScheduledApplication[timerApps.size()]);					}					for (int i = 0; i < apps.length; i++) {						try {							String filterString = apps[i].getEventFilter();							Filter filter = filterString == null ? null : FrameworkUtil.createFilter(filterString);							if (filter == null || filter.match(props))								apps[i].handleEvent(timerEvent);						} catch (Throwable t) {							t.printStackTrace();							// TODO should log this						}					}				} catch (InterruptedException e) {					// do nothing;				}			}		}