/** * Applique une suite d'actions sur tous les éléments d'une collection * * @param coll * @param todo */ private void structureDoAll(Collection coll, EList<EObject> todo) { if (coll.getObj() != null) { for (Object o : coll.getObj()) { for (EObject action : todo) { if (ActionWithObject.class.isAssignableFrom(action.getClass())) { ActionWithObject awo = (ActionWithObject) action; awo.setObject(o); execute(awo); } else { execute(action); } } } } else { List<WebElement> list = findCollection(coll); for (WebElement we : list) { for (EObject action : todo) { if (ActionWithObject.class.isAssignableFrom(action.getClass())) { ActionWithObject awo = (ActionWithObject) action; awo.setObject((Object) we); execute(awo); } else { execute(action); } } } } }