return deltas.iterator().next();
}
final Iterator<IErlElementDelta> iterator = deltas.iterator();
final IErlElement cRoot = ErlangEngine.getInstance().getModel();
final ErlElementDelta rootDelta = new ErlElementDelta(0, 0, cRoot);
boolean insertedTree = false;
while (iterator.hasNext()) {
final ErlElementDelta delta = (ErlElementDelta) iterator.next();
final IErlElement element = delta.getElement();
if (cRoot.equals(element)) {
final IErlElementDelta[] children = delta
.getChildren(IErlElementDelta.ALL);
for (final IErlElementDelta element0 : children) {
final ErlElementDelta projectDelta = (ErlElementDelta) element0;
rootDelta
.insertDeltaTree(projectDelta.getElement(), projectDelta);
insertedTree = true;
}
final IResourceDelta[] resourceDeltas = delta.getResourceDeltas();
if (resourceDeltas != null) {
for (final IResourceDelta element0 : resourceDeltas) {