private static void addWarning(
     final String message, final EObject object, final Set<Diagnostic> errors) {
   if (!GamaPreferences.WARNINGS_ENABLED.getValue()) {
     return;
   }
   Diagnostic d = new EObjectDiagnosticImpl(Severity.WARNING, "", message, object, null, 0, null);
   errors.add(d);
 }
 private static final Set<String> varDependenciesOf(final Statement s) {
   Set<String> list = new HashSet();
   for (Facet facet : EGaml.getFacetsOf(s)) {
     Expression expr = facet.getExpr();
     if (expr != null) {
       if (expr instanceof VariableRef) {
         list.add(EGaml.getKey.caseVariableRef((VariableRef) expr));
       } else {
         for (TreeIterator<EObject> tree = expr.eAllContents(); tree.hasNext(); ) {
           EObject obj = tree.next();
           if (obj instanceof VariableRef) {
             list.add(EGaml.getKey.caseVariableRef((VariableRef) obj));
           }
         }
       }
     }
   }
   if (list.isEmpty()) {
     return null;
   }
   return list;
 }
 private static void addInfo(
     final String message, final EObject object, final Set<Diagnostic> errors) {
   Diagnostic d = new EObjectDiagnosticImpl(Severity.INFO, "", message, object, null, 0, null);
   errors.add(d);
 }