@Override protected TreeIterator<Notifier> newContentsIterator() { return new ContentTreeIterator<Notifier>(emfObjects) { private static final long serialVersionUID = 1L; @Override protected Iterator<? extends EObject> getEObjectChildren(EObject eObject) { if(eObject instanceof XAbstractFeatureCall){ Iterable<EObject> result = eObject.eContents(); XAbstractFeatureCall featureCall = (XAbstractFeatureCall) eObject; XExpression implicitReceiver = featureCall.getImplicitReceiver(); if(implicitReceiver != null) result = Iterables.concat(result, Collections.singleton(implicitReceiver)); XExpression implicitFirstArgument = featureCall.getImplicitFirstArgument(); if(implicitFirstArgument != null) result = Iterables.concat(result, Collections.singleton(implicitFirstArgument)); return result.iterator(); } else return super.getEObjectChildren(eObject); } }; }
protected TreeIterator<EObject> getAllProperContents(List<EObject> contents) { return new ContentTreeIterator<EObject>(contents, false) { private static final long serialVersionUID = 1L; @SuppressWarnings("unchecked") @Override public Iterator<EObject> getChildren(Object object) { return object == this.object ? ((List<EObject>)object).iterator() : new ProperContentIterator<EObject>(((EObject)object)); } }; }