1 11 package org.eclipse.team.core.subscribers; 12 13 import org.eclipse.core.resources.IResource; 14 15 24 public class SubscriberChangeEvent implements ISubscriberChangeEvent { 25 26 private Subscriber subscriber; 27 private int flags; 28 private IResource resource; 29 30 36 public SubscriberChangeEvent(Subscriber subscriber, int flags, IResource resource) { 37 this.subscriber = subscriber; 38 this.flags = flags; 39 this.resource = resource; 40 } 41 42 45 public int getFlags() { 46 return flags; 47 } 48 49 52 public IResource getResource() { 53 return resource; 54 } 55 56 59 public Subscriber getSubscriber() { 60 return subscriber; 61 } 62 63 70 public static SubscriberChangeEvent[] asSyncChangedDeltas(Subscriber subscriber, IResource[] resources) { 71 SubscriberChangeEvent[] deltas = new SubscriberChangeEvent[resources.length]; 72 for (int i = 0; i < resources.length; i++) { 73 IResource resource = resources[i]; 74 deltas[i] = new SubscriberChangeEvent(subscriber, ISubscriberChangeEvent.SYNC_CHANGED, resource); 75 } 76 return deltas; 77 } 78 } 79 | Popular Tags |