Package org.eclipse.pde.core
Class ModelChangedEvent
- java.lang.Object
- 
- org.eclipse.pde.core.ModelChangedEvent
 
- 
- All Implemented Interfaces:
- IModelChangedEvent
 
 public class ModelChangedEvent extends Object implements IModelChangedEvent - Since:
- 2.0
- See Also:
- IModelChangedEvent
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
 
- 
- 
Field Summary- 
Fields inherited from interface org.eclipse.pde.core.IModelChangedEventCHANGE, INSERT, REMOVE, WORLD_CHANGED
 
- 
 - 
Constructor SummaryConstructors Constructor Description ModelChangedEvent(IModelChangeProvider provider, int type, Object[] objects, String changedProperty)The constructor of the event.ModelChangedEvent(IModelChangeProvider provider, Object object, String changedProperty, Object oldValue, Object newValue)A costructor that should be used for changes of object properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getChangedObjects()Returns an array of model objects that are affected by the change.StringgetChangedProperty()Returns a name of the object's property that has been changed if change type is CHANGE.IModelChangeProvidergetChangeProvider()Returns the provider that fired this event.intgetChangeType()Returns the type of change that occured in the model (one of INSERT, REMOVE, CHANGE or WORLD_CHANGED ).ObjectgetNewValue()When model change is of type CHANGE, this method is used to obtain the new value of the property (after the change).ObjectgetOldValue()When model change is of type CHANGE, this method is used to obtain the old value of the property (before the change).
 
- 
- 
- 
Constructor Detail- 
ModelChangedEventpublic ModelChangedEvent(IModelChangeProvider provider, int type, Object[] objects, String changedProperty) The constructor of the event.- Parameters:
- provider- the change provider
- type- the event type
- objects- the changed objects
- changedProperty- or null if not applicable
 
 - 
ModelChangedEventpublic ModelChangedEvent(IModelChangeProvider provider, Object object, String changedProperty, Object oldValue, Object newValue) A costructor that should be used for changes of object properties.- Parameters:
- provider- the event provider
- object- affected object
- changedProperty- changed property of the affected object
- oldValue- the value before the change
- newValue- the value after the change
 
 
- 
 - 
Method Detail- 
getChangeProviderpublic IModelChangeProvider getChangeProvider() Description copied from interface:IModelChangedEventReturns the provider that fired this event.- Specified by:
- getChangeProviderin interface- IModelChangedEvent
- Returns:
- the event provider
 
 - 
getChangedObjectspublic Object[] getChangedObjects() Description copied from interface:IModelChangedEventReturns an array of model objects that are affected by the change.- Specified by:
- getChangedObjectsin interface- IModelChangedEvent
- Returns:
- array of affected objects
 
 - 
getChangedPropertypublic String getChangedProperty() Description copied from interface:IModelChangedEventReturns a name of the object's property that has been changed if change type is CHANGE.- Specified by:
- getChangedPropertyin interface- IModelChangedEvent
- Returns:
- property that has been changed in the model object, or null if type is not CHANGE or if more than one property has been changed.
 
 - 
getOldValuepublic Object getOldValue() Description copied from interface:IModelChangedEventWhen model change is of type CHANGE, this method is used to obtain the old value of the property (before the change).- Specified by:
- getOldValuein interface- IModelChangedEvent
- Returns:
- the old value of the changed property
 
 - 
getNewValuepublic Object getNewValue() Description copied from interface:IModelChangedEventWhen model change is of type CHANGE, this method is used to obtain the new value of the property (after the change).- Specified by:
- getNewValuein interface- IModelChangedEvent
- Returns:
- the new value of the changed property.
 
 - 
getChangeTypepublic int getChangeType() Description copied from interface:IModelChangedEventReturns the type of change that occured in the model (one of INSERT, REMOVE, CHANGE or WORLD_CHANGED ).- Specified by:
- getChangeTypein interface- IModelChangedEvent
- Returns:
- type of change
 
 
- 
 
-