org.eclipse.gmf.runtime.diagram.core.listener
Class NotificationUtil
java.lang.Object
org.eclipse.gmf.runtime.diagram.core.listener.NotificationUtil
-
public class NotificationUtil
- extends java.lang.Object
Utility class that implements few helper methods around the EMF
Notification
object
Method Summary
|
static java.util.Set
|
getAddedObjects
(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
Collect the added objects from all the notifications in the event. |
static java.util.Set
|
getDeletedObjects
(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
Collect the deleted objects from all the notifications in the event. |
static boolean
|
isCustomNotification
(org.eclipse.emf.common.notify.Notification notification)
checks if the Notification is a custom notification or not |
static boolean
|
isElementAddedToSlot
(org.eclipse.emf.common.notify.Notification notification)
checks if the event resulted in adding an element |
static boolean
|
isElementRemovedFromSlot
(org.eclipse.emf.common.notify.Notification notification)
checks if the event resulted in removing an element |
static boolean
|
isMove
(org.eclipse.emf.common.notify.Notification notification)
checks if the event is an Notification.MOVE event. |
static boolean
|
isSlotModified
(org.eclipse.emf.common.notify.Notification notification)
checks if the event resulted in a slot modification (set/unset event) |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
NotificationUtil
public NotificationUtil()
isSlotModified
public static boolean isSlotModified(org.eclipse.emf.common.notify.Notification notification)
- checks if the event resulted in a slot modification (set/unset event)
-
-
Returns:
-
true if the event type is
one of
Notification.SET
or Notification.UNSET
;
otherwise false.
isElementAddedToSlot
public static boolean isElementAddedToSlot(org.eclipse.emf.common.notify.Notification notification)
- checks if the event resulted in adding an element
-
-
Returns:
-
true if the event type is
one of
Notification.ADD
or Notification.ADD_MANY
;
otherwise false.
isElementRemovedFromSlot
public static boolean isElementRemovedFromSlot(org.eclipse.emf.common.notify.Notification notification)
- checks if the event resulted in removing an element
-
-
Returns:
-
true if the event type is
one of
Notification.REMOVE
or Notification.REMOVE_MANY
;
otherwise false.
isMove
public static boolean isMove(org.eclipse.emf.common.notify.Notification notification)
- checks if the event is an
Notification.MOVE
event.
-
-
Returns:
-
true if the event type equals
Notification.MOVE
; otherwise false.
isCustomNotification
public static boolean isCustomNotification(org.eclipse.emf.common.notify.Notification notification)
- checks if the Notification is a custom notification or not
-
-
Returns:
-
true if the noptificatio is custom notification otherwise false.
getDeletedObjects
public static java.util.Set getDeletedObjects(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
- Collect the deleted objects from all the notifications in the event.
-
-
Parameters:
-
event
-
-
Returns:
-
getAddedObjects
public static java.util.Set getAddedObjects(org.eclipse.emf.transaction.ResourceSetChangeEvent event)
- Collect the added objects from all the notifications in the event.
-
-
Parameters:
-
event
-
-
Returns:
- Set contains all added objects
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.