1 11 package org.eclipse.pde.internal.core; 12 13 import org.eclipse.pde.core.IModel; 14 import org.eclipse.pde.core.IModelProviderEvent; 15 16 public class ModelProviderEvent implements IModelProviderEvent { 17 private int types; 18 private Object source; 19 private IModel [] added; 20 private IModel [] removed; 21 private IModel [] changed; 22 23 public ModelProviderEvent(Object source, int types, IModel [] added, IModel [] removed, IModel [] changed) { 24 this.source = source; 25 this.types = types; 26 this.added = added; 27 this.removed = removed; 28 this.changed = changed; 29 } 30 31 public IModel [] getAddedModels() { 32 return (added == null) ? new IModel[0] : added ; 33 } 34 35 public IModel [] getRemovedModels() { 36 return (removed == null) ? new IModel[0] : removed; 37 } 38 39 public IModel [] getChangedModels() { 40 return (changed == null) ? new IModel[0] : changed; 41 } 42 43 public int getEventTypes() { 44 return types; 45 } 46 47 public Object getEventSource() { 48 return source; 49 } 50 } 51 | Popular Tags |