01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core;
11:
12: import org.eclipse.pde.core.IModel;
13: import org.eclipse.pde.core.IModelProviderEvent;
14:
15: public class ModelProviderEvent implements IModelProviderEvent {
16: private int types;
17: private Object source;
18: private IModel[] added;
19: private IModel[] removed;
20: private IModel[] changed;
21:
22: public ModelProviderEvent(Object source, int types, IModel[] added,
23: 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: }
|