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.core;
11:
12: /**
13: * This event will be delivered to all model provider listeners when a model
14: * managed by the model provider changes in some way.
15: *
16: * @since 2.0
17: */
18: public interface IModelProviderEvent {
19: /**
20: * Event is sent after the models have been added.
21: */
22: int MODELS_ADDED = 0x1;
23: /**
24: * Event is sent before the models will be removed.
25: */
26: int MODELS_REMOVED = 0x2;
27: /**
28: * Event is sent after the models have been changed.
29: */
30: int MODELS_CHANGED = 0x4;
31:
32: /**
33: * Event is sent when the target platform changes
34: *
35: * @since 3.2
36: */
37: int TARGET_CHANGED = 0x8;
38:
39: /**
40: * Returns the models that are added
41: *
42: * @return the models that have been added or an empty array
43: */
44: IModel[] getAddedModels();
45:
46: /**
47: * Returns the models that are removed
48: *
49: * @return the models that have been removed or an empty array
50: */
51: IModel[] getRemovedModels();
52:
53: /**
54: * Returns the models that has changed
55: *
56: * @return the models that has changed or an empty array
57: */
58: IModel[] getChangedModels();
59:
60: /**
61: * Returns the combination of flags indicating type of event. In case of
62: * multiple changes, flags are ORed together. (a combination of
63: * MODEL_CHANGED, MODEL_ADDED, MODEL_REMOVED)
64: *
65: * @return the model change type
66: */
67: int getEventTypes();
68:
69: /**
70: * Returns the object that fired this event.
71: */
72: Object getEventSource();
73: }
|