1 11 package org.eclipse.core.internal.registry.osgi; 12 13 import java.util.Map ; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.core.runtime.jobs.ISchedulingRule; 17 import org.eclipse.core.runtime.jobs.Job; 18 import org.eclipse.core.runtime.spi.RegistryStrategy; 19 20 23 final public class ExtensionEventDispatcherJob extends Job { 24 private final static ISchedulingRule EXTENSION_EVENT_RULE = new ISchedulingRule() { 26 public boolean contains(ISchedulingRule rule) { 27 return rule == this; 28 } 29 30 public boolean isConflicting(ISchedulingRule rule) { 31 return rule == this; 32 } 33 }; 34 private Map deltas; 35 private Object [] listenerInfos; 36 private Object registry; 37 38 public ExtensionEventDispatcherJob(Object [] listenerInfos, Map deltas, Object registry) { 39 super("Registry event dispatcher"); setSystem(true); 42 this.listenerInfos = listenerInfos; 43 this.deltas = deltas; 44 this.registry = registry; 45 setRule(EXTENSION_EVENT_RULE); 47 } 48 49 public IStatus run(IProgressMonitor monitor) { 50 return RegistryStrategy.processChangeEvent(listenerInfos, deltas, registry); 51 } 52 } 53 | Popular Tags |