Package org.eclipse.emf.common.notify

Examples of org.eclipse.emf.common.notify.Adapter


   * @param type the type of adapter.
   * @return an adapter associated with the specified eObject or null.
   */
  public static Adapter getRegisteredAdapter(Resource resource, Object type)
  {
    Adapter result = getExistingAdapter(resource, type);
    if (result == null)
    {
      ResourceSet resourceSet = resource.getResourceSet();
      if (resourceSet != null)
      {
View Full Code Here


   */
  public static Adapter getAdapter(List<Adapter> adapters, Object type)
  {
    for (int i = 0, size = adapters.size(); i < size; ++i)
    {
      Adapter adapter = adapters.get(i);
      if (adapter.isAdapterForType(type))
      {
        return adapter;
      }
    }
    return null;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

          for (Listener listener : listeners)
          {
            listener.removed(MinimalEObjectImpl.this, oldObject);
          }
        }
        Adapter adapter = oldObject;
        if (eDeliver())
        {
          Notification notification =
            new NotificationImpl(Notification.REMOVING_ADAPTER, oldObject, null, index)
            {
              @Override
              public Object getNotifier()
              {
                return MinimalEObjectImpl.this;
              }
            };
          adapter.notifyChanged(notification);
        }
        if (adapter instanceof Adapter.Internal)
        {
          ((Adapter.Internal)adapter).unsetTarget(MinimalEObjectImpl.this);
        }
        else if (adapter.getTarget() == MinimalEObjectImpl.this)
        {
          adapter.setTarget(null);
        }
      }
View Full Code Here

            NotificationFilter
                .createEventTypeFilter(Notification.ADD)).and(
            NotificationFilter.createFeatureFilter(
                ResourceSet.class,
                ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

    final NotificationFilter diagramResourceModifiedFilter = NotificationFilter
        .createNotifierFilter(editingDomain.getResourceSet())
        .and(NotificationFilter.createEventTypeFilter(Notification.ADD))
        .and(NotificationFilter.createFeatureFilter(ResourceSet.class,
            ResourceSet.RESOURCE_SET__RESOURCES));
    editingDomain.getResourceSet().eAdapters().add(new Adapter() {

      private Notifier myTarger;

      public Notifier getTarget() {
        return myTarger;
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.notify.Adapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.