public static void collectInfo(ExpressionInfo info, MExpression exp) {
   if (!(exp instanceof MCoreExpression)) {
     return;
   }
   MCoreExpression expr = (MCoreExpression) exp;
   Expression ref = null;
   if (expr.getCoreExpression() instanceof Expression) {
     ref = (Expression) expr.getCoreExpression();
   } else {
     ref = new ReferenceExpression(expr.getCoreExpressionId());
     expr.setCoreExpression(ref);
   }
   ref.collectExpressionInfo(info);
 }
 public static boolean isVisible(MCoreExpression exp, ExpressionContext eContext) {
   Expression ref = null;
   if (exp.getCoreExpression() instanceof Expression) {
     ref = (Expression) exp.getCoreExpression();
   } else {
     ref = new ReferenceExpression(exp.getCoreExpressionId());
     exp.setCoreExpression(ref);
   }
   try {
     // Creates dependency on a predefined value that can be "poked" by the evaluation
     // service
     ExpressionInfo info = ref.computeExpressionInfo();
     String[] names = info.getAccessedPropertyNames();
     for (String name : names) {
       eContext.getVariable(name + ".evaluationServiceLink"); // $NON-NLS-1$
     }
     return ref.evaluate(eContext) != EvaluationResult.FALSE;
   } catch (CoreException e) {
     trace("isVisible exception", e); // $NON-NLS-1$
   }
   return false;
 }