// fire subscriber events to notify listeners ofs syncstate change
List<SubscriberChangeEvent> events = new ArrayList<SubscriberChangeEvent>();
for (IResource root : roots()) {
SubscriberChangeEvent eventA = new SubscriberChangeEvent(this, SubscriberChangeEvent.ROOT_REMOVED, root);
SubscriberChangeEvent eventB = new SubscriberChangeEvent(this, SubscriberChangeEvent.ROOT_ADDED, root);
events.add(eventA);
events.add(eventB);
}
fireTeamResourceChange(events.toArray(new SubscriberChangeEvent[0]));
} catch (Exception e) {
List<SubscriberChangeEvent> events = new ArrayList<SubscriberChangeEvent>();
for (IResource root : roots()) {
SubscriberChangeEvent eventA = new SubscriberChangeEvent(this, SubscriberChangeEvent.ROOT_REMOVED, root);
events.add(eventA);
}
fireTeamResourceChange(events.toArray(new SubscriberChangeEvent[0]));
throw new RuntimeException(e);