/**
* Creates a custom notification and sends it for proxy and loaded object. Registers adapters to loaded object.
*
* @param idx
* index in the contents list (first or second slot)
* @param oldProxy
* the proxified object before being loaded
*/
protected void notifyProxyResolved(int idx, EObject oldProxy) {
if (eNotificationRequired() && idx < contents.size()) {
EObject newObject = contents.basicGet(idx);
Notification notification = new NotificationImpl(Notification.RESOLVE, oldProxy, newObject) {
@Override
public Object getNotifier() {
return N4JSResource.this;
}
@Override
public int getFeatureID(Class<?> expectedClass) {
return RESOURCE__CONTENTS;
}
};
eNotify(notification);
for (Adapter adapter : eAdapters()) {
if (adapter instanceof EContentAdapter && !newObject.eAdapters().contains(adapter)) {
newObject.eAdapters().add(adapter);
}
}
}
}
N4JSResource.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:n4js
作者:
评论列表
文章目录