org.eclipse.emf.common.notify.Adapter类的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中org.eclipse.emf.common.notify.Adapter类的一些代码示例,展示了Adapter类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Adapter类的具体详情如下:
包路径:org.eclipse.emf.common.notify.Adapter
类名称:Adapter

Adapter介绍

[英]A receiver of notifications. An adapter is typically associated with a Notifier via an AdapterFactory.
[中]通知的接收者。适配器通常通过AdapterFactory与通知程序相关联。

代码示例

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

adapter.notifyChanged(notification);
else if (adapter.getTarget() == notifier) 
 adapter.setTarget(null);

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core

private void addedEJBRelation(EJBRelation aRelation, EObject sf) {
  Adapter a = getAdapter(aRelation);
  if (a != null) {
    Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.ADD,(EStructuralFeature) sf, null, aRelation, Notification.NO_INDEX);
    a.notifyChanged(not);
  }
}
private Adapter getAdapter(EObject anObject) {

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public ISelection mapSelection(ISelection selection)
 {
  List list = new ArrayList();
  if (selection instanceof IStructuredSelection)
  {  
   IStructuredSelection structuredSelection = (IStructuredSelection)selection;
   for (Iterator i = structuredSelection.iterator(); i.hasNext(); )
   {
    Object o = i.next();
    if (o instanceof Adapter)
    {
     list.add(((Adapter)o).getTarget());
    }  
    else
    {
     list.add(o);
    }  
   }  
  }
  return new StructuredSelection(list);
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

@Override
protected void didAdd(int index, E newObject)
{
 if (listeners != null)
 {
  for (Listener listener : listeners)
  {
   listener.added(notifier, newObject);
  }
 }
 newObject.setTarget(notifier);
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core

private void removedEJBRelation(EJBRelation aRelation, EObject sf) {
  Adapter a = getAdapter(aRelation);
  if (a != null) {
    Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.REMOVE,(EStructuralFeature) sf, aRelation, null, Notification.NO_INDEX);
    a.notifyChanged(not);
  }
}
private void addedEJBRelation(EJBRelation aRelation, EObject sf) {

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (input instanceof Adapter)
 XSDConcreteComponent concreteComponent = (XSDConcreteComponent)((Adapter)input).getTarget();
 return new DesignViewNavigationLocation(this, concreteComponent);

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

public void eNotify(Notification notification)
{
 Adapter[] eAdapters = eBasicAdapterArray();
 if (eAdapters != null && eDeliver())
 {
  for (int i = 0, size = eAdapters.length; i < size; ++i)
  {
   eAdapters[i].notifyChanged(notification);
  }
 }
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (adapter.getTarget() instanceof XSDElementDeclaration)
 concreteComponent = (XSDElementDeclaration)adapter.getTarget();

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: org.eclipse.uml2/org.eclipse.uml2.uml

@Override
public void eNotify(Notification notification) {
  if (eDeliver()) {
    Adapter[] eBasicAdapters = eBasicAdapterArray();
    if (eBasicAdapters == null) {
      CacheAdapter cacheAdapter = getCacheAdapter();
      if (cacheAdapter != null) {
        cacheAdapter.notifyChanged(notification);
      }
    } else {
      for (int i = 0, size = eBasicAdapters.length; i < size; i++) {
        eBasicAdapters[i].notifyChanged(notification);
      }
    }
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (adapter.getTarget() instanceof XSDElementDeclaration)
 concreteComponent = (XSDElementDeclaration)adapter.getTarget();

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (adpater.getTarget() instanceof XSDConcreteComponent)
 concreteComponent = (XSDConcreteComponent)adpater.getTarget();

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (adpater.getTarget() instanceof XSDConcreteComponent)
 concreteComponent = (XSDConcreteComponent)adpater.getTarget();

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(InnerBlockDocumentationAdapter.class);
  }
});

代码示例来源:origin: io.sarl.lang/io.sarl.lang

public boolean test(Adapter adapter) {
    return adapter.isAdapterForType(DocumentationAdapter.class);
  }
});

相关文章