@Override public Expression caseExpression_String(Expression_String object) { String value = object.getValue(); if (value == null || value.isEmpty()) { return EngineExpressionUtil.createConstantExpression( "<empty-string>", "", String.class.getName()); } return EngineExpressionUtil.createConstantExpression(value, value, String.class.getName()); }
@Override public Expression caseExpression_ProcessRef(Expression_ProcessRef object) { EObject resolvedProxy = resolveProxy(object.getValue()); for (EObject dep : studioExpression.getReferencedElements()) { if (dep instanceof Data && resolvedProxy instanceof Data) { if (((Data) dep).getName().equals(((Data) resolvedProxy).getName())) { return EngineExpressionUtil.createVariableExpression((Data) dep); } } else if (dep instanceof Parameter && resolvedProxy instanceof Parameter) { if (((Parameter) dep).getName().equals(((Parameter) resolvedProxy).getName())) { return EngineExpressionUtil.createParameterExpression((Parameter) dep); } } } return null; }
@Override public Expression caseExpression_Double(Expression_Double object) { return EngineExpressionUtil.createConstantExpression( String.valueOf(object.getValue()), String.valueOf(object.getValue()), Double.class.getName()); }
@Override public Expression caseExpression_Boolean(Expression_Boolean object) { return EngineExpressionUtil.createConstantExpression( String.valueOf(object.isValue()), String.valueOf(object.isValue()), Boolean.class.getName()); }
@Override public Expression caseExpression_Integer(Expression_Integer object) { return EngineExpressionUtil.createConstantExpression( String.valueOf(object.getValue()), String.valueOf(object.getValue()), Long.class.getName()); }