Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.diagram.core.listener
Class NotificationUtil

java.lang.Object
  extended by 
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


Constructor Summary
NotificationUtil ()
           
 
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
 

Constructor Detail

NotificationUtil

public NotificationUtil()
Method Detail

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

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire