public void notifyChanged(Notification notification) { super.notifyChanged(notification); notifyFacesConfigChangeListeners(notification); } }
/** * Handles installation of the adapter on a Resource * by adding the adapter to each of the directly contained objects. */ protected void setTarget(Resource target) { basicSetTarget(target); List<EObject> contents = target.getContents(); for (int i = 0, size = contents.size(); i < size; ++i) { Notifier notifier = contents.get(i); addAdapter(notifier); } }
/** * Handles installation of the adapter * by adding the adapter to each of the directly contained objects. */ @Override public void setTarget(Notifier target) { if (target instanceof EObject) { setTarget((EObject)target); } else if (target instanceof Resource) { setTarget((Resource)target); } else if (target instanceof ResourceSet) { setTarget((ResourceSet)target); } else { basicSetTarget(target); } }
/** * Handles undoing the installation of the adapter * by removing the adapter from each of the directly contained objects. * @deprecated Use or override {@link #unsetTarget(Notifier)} instead. */ @Deprecated protected void unsetTarget(Object target) { if (target instanceof EObject) { unsetTarget((EObject)target); } else if (target instanceof Resource) { unsetTarget((Resource)target); } else if (target instanceof ResourceSet) { unsetTarget((ResourceSet)target); } else { basicUnsetTarget((Notifier)target); } }
basicSetTarget(target); if (useRecursion()) for (Iterator<? extends Notifier> i = resolve() ? target.eContents().iterator() : ((InternalEList<? extends Notifier>)target.eContents()).basicIterator(); addAdapter(notifier); for (TreeIterator<EObject> i = EcoreUtil.getAllContents(target, resolve()); i.hasNext(); ) addAdapter(eObject);
/** * Handles installation of the adapter on an EObject * by adding the adapter to each of the directly contained objects. */ protected void setTarget(EObject target) { basicSetTarget(target); for (Iterator<? extends Notifier> i = resolve() ? target.eContents().iterator() : ((InternalEList<? extends Notifier>)target.eContents()).basicIterator(); i.hasNext(); ) { Notifier notifier = i.next(); addAdapter(notifier); } }
if (oldValue.eAdapters().contains(this)) removeAdapter(oldValue); Notifier newValue = (Notifier)notification.getNewValue(); addAdapter(newValue); removeAdapter((Notifier)oldValue, false, true); addAdapter(newValue); if (oldValue != null) removeAdapter(oldValue, false, true); addAdapter(newValue); if (newValue != null) addAdapter(newValue); for (Notifier newValue : newValues) addAdapter(newValue); removeAdapter(oldValue, checkContainer, checkResource); removeAdapter(oldContentValue, checkContainer, checkResource);
/** * Handles undoing the installation of the adapter * by removing the adapter from each of the directly contained objects. */ @Override public void unsetTarget(Notifier target) { unsetTarget((Object)target); }
/** * Handles undoing the installation of the adapter from an EObject * by removing the adapter from each of the directly contained objects. */ protected void unsetTarget(EObject target) { basicUnsetTarget(target); if (useRecursion()) { for (Iterator<? extends Notifier> i = resolve() ? target.eContents().iterator() : ((InternalEList<EObject>)target.eContents()).basicIterator(); i.hasNext(); ) { Notifier notifier = i.next(); removeAdapter(notifier, false, true); } } else if (!iterating) { iterating = true; for (TreeIterator<EObject> i = EcoreUtil.getAllContents(target, resolve()); i.hasNext(); ) { EObject eObject = i.next(); removeAdapter(eObject, false, true); } iterating = false; } }
/** * Handles undoing the installation of the adapter from a Resource * by removing the adapter from each of the directly contained objects. */ protected void unsetTarget(Resource target) { basicUnsetTarget(target); List<EObject> contents = target.getContents(); for (int i = 0, size = contents.size(); i < size; ++i) { Notifier notifier = contents.get(i); removeAdapter(notifier, true, false); } }
/** * Handles undoing the installation of the adapter from an EObject * by removing the adapter from each of the directly contained objects. */ protected void unsetTarget(EObject target) { basicUnsetTarget(target); for (Iterator<? extends Notifier> i = resolve() ? target.eContents().iterator() : ((InternalEList<EObject>)target.eContents()).basicIterator(); i.hasNext(); ) { Notifier notifier = i.next(); removeAdapter(notifier, false, true); } }
@Override protected void setTarget(EObject target) { for (EClass c : target.eClass().getEAllSuperTypes()) { put(c, target); } put(target.eClass(), target); super.setTarget(target); }
@Override protected void addAdapter(Notifier notifier) { if (observing(notifier)) { super.addAdapter(notifier); } }
@Override protected void removeAdapter(Notifier notifier) { if (notifier instanceof CDOObject) { CDOObject o = (CDOObject) notifier; if (!o.cdoInvalid()) super.removeAdapter(notifier); } }
handleContainment(notification); handleContainment(notification); if (eReference.isContainment()) handleContainment(notification);
if (oldValue.eAdapters().contains(this)) removeAdapter(oldValue); Notifier newValue = (Notifier)notification.getNewValue(); addAdapter(newValue); removeAdapter((Notifier)oldValue, false, true); addAdapter(newValue); if (oldValue != null) removeAdapter(oldValue, false, true); addAdapter(newValue); if (newValue != null) addAdapter(newValue); for (Notifier newValue : newValues) addAdapter(newValue); removeAdapter(oldValue, checkContainer, checkResource); removeAdapter(oldContentValue, checkContainer, checkResource);
/** * Handles undoing the installation of the adapter * by removing the adapter from each of the directly contained objects. */ @Override public void unsetTarget(Notifier target) { unsetTarget((Object)target); }
/** * Handles undoing the installation of the adapter from a Resource * by removing the adapter from each of the directly contained objects. */ protected void unsetTarget(Resource target) { basicUnsetTarget(target); List<EObject> contents = target.getContents(); for (int i = 0, size = contents.size(); i < size; ++i) { Notifier notifier = contents.get(i); removeAdapter(notifier, true, false); } }
/** * Handles undoing the installation of the adapter * by removing the adapter from each of the directly contained objects. * @deprecated Use or override {@link #unsetTarget(Notifier)} instead. */ @Deprecated protected void unsetTarget(Object target) { if (target instanceof EObject) { unsetTarget((EObject)target); } else if (target instanceof Resource) { unsetTarget((Resource)target); } else if (target instanceof ResourceSet) { unsetTarget((ResourceSet)target); } else { basicUnsetTarget((Notifier)target); } }
@Override protected void setTarget(EObject target) { if (isConnectedObject(target)) { if (adaptedRoot == null) { adaptedRoot = new WeakReference<CDOObject>(CDOUtil.getCDOObject(target)); } basicSetTarget(target); if (target instanceof Resource) { addCleanObjectHandler(target); } } else { super.setTarget(target); } }